From: NAKAMURA Takumi Date: Wed, 23 Jan 2013 08:30:39 +0000 (+0000) Subject: IRTests/IRBuilderTest.cpp: Let GV added to the module. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f25b003523c3c75e2db4b478e040f1c6925667a5;p=oota-llvm.git 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 --- diff --git a/unittests/IR/IRBuilderTest.cpp b/unittests/IR/IRBuilderTest.cpp index c56721f51b6..8c3471c3de4 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() {