summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit7493658645950cd93e589a79e1f4bb66494418d0 (patch)
tree2f3f867d0bfcc68ffa1909082858ad6442dc428a /llvm/unittests/IR
parent0c8f08d305af27c279a0e4d649c651620238e1a7 (diff)
downloadbcm5719-llvm-7493658645950cd93e589a79e1f4bb66494418d0.tar.gz
bcm5719-llvm-7493658645950cd93e589a79e1f4bb66494418d0.zip
IRTests/IRBuilderTest.cpp: Let GV added to the module.
It fixes --vg-leak. llvm-svn: 173237
Diffstat (limited to 'llvm/unittests/IR')
-rw-r--r--llvm/unittests/IR/IRBuilderTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index c56721f51b6..8c3471c3de4 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/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() {
OpenPOWER on IntegriCloud