Mercurial > projects > ldc
diff gen/runtime.cpp @ 1506:76936858d1c6
Return `void*` from _d_allocclass so LLVM doesn't do weird things with it...
This allows `-instcombine` followed by `-gvn` to do devirtualization, so add
`-gvn` in strategic places in the default pass order.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Sat, 20 Jun 2009 11:39:13 +0200 |
parents | 9344fecd24f0 |
children | 09734fb929c0 |
line wrap: on
line diff
--- a/gen/runtime.cpp Thu Jun 18 15:44:18 2009 +0100 +++ b/gen/runtime.cpp Sat Jun 20 11:39:13 2009 +0200 @@ -329,7 +329,7 @@ std::string fname("_d_allocclass"); std::vector<const LLType*> types; types.push_back(classInfoTy); - const llvm::FunctionType* fty = llvm::FunctionType::get(objectTy, types, false); + const llvm::FunctionType* fty = llvm::FunctionType::get(voidPtrTy, types, false); llvm::Function::Create(fty, llvm::GlobalValue::ExternalLinkage, fname, M) ->setAttributes(Attr_NoAlias); }