diff options
Diffstat (limited to 'unittests/ExecutionEngine/JIT/JITTest.cpp')
-rw-r--r-- | unittests/ExecutionEngine/JIT/JITTest.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unittests/ExecutionEngine/JIT/JITTest.cpp b/unittests/ExecutionEngine/JIT/JITTest.cpp index 8f29918..87f3498 100644 --- a/unittests/ExecutionEngine/JIT/JITTest.cpp +++ b/unittests/ExecutionEngine/JIT/JITTest.cpp @@ -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); |