mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-16 12:53:14 +01:00
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.
This commit is contained in:
@@ -329,7 +329,7 @@ static void LLVM_D_BuildRuntimeModule()
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user