mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 23:21:04 +00:00
Don't use a void return type with a function that returns a value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d696d8040
commit
c6f40b6ffb
@ -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
Block a user