diff options
author | Dan Gohman <gohman@apple.com> | 2009-07-11 13:56:14 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-07-11 13:56:14 +0000 |
commit | 1ee5b3b5dbe235f67f80c20a512142a41fda4877 (patch) | |
tree | 556419a074361331dc02f75898e8e3b5b8e7cb25 /unittests | |
parent | ced9ff8ea2fac344da91d925294817ad51f51e06 (diff) | |
download | external_llvm-1ee5b3b5dbe235f67f80c20a512142a41fda4877.zip external_llvm-1ee5b3b5dbe235f67f80c20a512142a41fda4877.tar.gz external_llvm-1ee5b3b5dbe235f67f80c20a512142a41fda4877.tar.bz2 |
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
Diffstat (limited to 'unittests')
-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); |