summaryrefslogtreecommitdiff
path: root/unittests/IR
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-23 08:30:39 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-23 08:30:39 +0000
commitf25b003523c3c75e2db4b478e040f1c6925667a5 (patch)
tree7921dc597a0b9f2509f9e92b577cf6386aa33789 /unittests/IR
parent6bf3e46aa87d0cb6044f2282a40411211bf95a5d (diff)
downloadllvm-f25b003523c3c75e2db4b478e040f1c6925667a5.tar.gz
llvm-f25b003523c3c75e2db4b478e040f1c6925667a5.tar.bz2
llvm-f25b003523c3c75e2db4b478e040f1c6925667a5.tar.xz
IRTests/IRBuilderTest.cpp: Let GV added to the module.
It fixes --vg-leak. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/IR')
-rw-r--r--unittests/IR/IRBuilderTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/IR/IRBuilderTest.cpp b/unittests/IR/IRBuilderTest.cpp
index c56721f51b..8c3471c3de 100644
--- a/unittests/IR/IRBuilderTest.cpp
+++ b/unittests/IR/IRBuilderTest.cpp
@@ -30,8 +30,8 @@ protected:
/*isVarArg=*/false);
F = Function::Create(FTy, Function::ExternalLinkage, "", M.get());
BB = BasicBlock::Create(getGlobalContext(), "", F);
- GV = new GlobalVariable(Type::getFloatTy(getGlobalContext()), true,
- GlobalValue::ExternalLinkage);
+ GV = new GlobalVariable(*M, Type::getFloatTy(getGlobalContext()), true,
+ GlobalValue::ExternalLinkage, 0);
}
virtual void TearDown() {