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
This commit is contained in:
NAKAMURA Takumi 2013-01-23 08:30:39 +00:00
parent 6bf3e46aa8
commit f25b003523

View File

@ -30,8 +30,8 @@ protected:
/*isVarArg=*/false); /*isVarArg=*/false);
F = Function::Create(FTy, Function::ExternalLinkage, "", M.get()); F = Function::Create(FTy, Function::ExternalLinkage, "", M.get());
BB = BasicBlock::Create(getGlobalContext(), "", F); BB = BasicBlock::Create(getGlobalContext(), "", F);
GV = new GlobalVariable(Type::getFloatTy(getGlobalContext()), true, GV = new GlobalVariable(*M, Type::getFloatTy(getGlobalContext()), true,
GlobalValue::ExternalLinkage); GlobalValue::ExternalLinkage, 0);
} }
virtual void TearDown() { virtual void TearDown() {