summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-11 13:56:14 +0000
committerDan Gohman <gohman@apple.com>2009-07-11 13:56:14 +0000
commita32ee1d3f2f244eba0d9a45f2d94d89ec08a7f26 (patch)
tree2e2e4d731ba13c18b93dd0b13df1a6fbd2a8d53d /llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
parentccb29cd29025570f4a09f964d2b409de29a8149c (diff)
downloadbcm5719-llvm-a32ee1d3f2f244eba0d9a45f2d94d89ec08a7f26.tar.gz
bcm5719-llvm-a32ee1d3f2f244eba0d9a45f2d94d89ec08a7f26.zip
Don't use a void return type with a function that returns a value.
llvm-svn: 75364
Diffstat (limited to 'llvm/unittests/ExecutionEngine/JIT/JITTest.cpp')
-rw-r--r--llvm/unittests/ExecutionEngine/JIT/JITTest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp b/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
index 8f29918a992..87f3498facc 100644
--- a/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud