Don't use a void return type with a function that returns a value.
llvm-svn: 75364
This commit is contained in:
parent
ccb29cd290
commit
a32ee1d3f2
|
@ -30,7 +30,8 @@ namespace {
|
|||
|
||||
Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
|
||||
std::vector<const Type*> params;
|
||||
const FunctionType *FTy = FunctionType::get(Type::VoidTy, params, false);
|
||||
const FunctionType *FTy = FunctionType::get(G->getType()->getElementType(),
|
||||
params, false);
|
||||
Function *F = Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M);
|
||||
BasicBlock *Entry = BasicBlock::Create("entry", F);
|
||||
IRBuilder<> builder(Entry);
|
||||
|
|
Loading…
Reference in New Issue