[llvm-commits] [llvm] r173237 - /llvm/trunk/unittests/IR/IRBuilderTest.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Wed Jan 23 00:30:39 PST 2013
Author: chapuni
Date: Wed Jan 23 02:30:39 2013
New Revision: 173237
URL: http://llvm.org/viewvc/llvm-project?rev=173237&view=rev
Log:
IRTests/IRBuilderTest.cpp: Let GV added to the module.
It fixes --vg-leak.
Modified:
llvm/trunk/unittests/IR/IRBuilderTest.cpp
Modified: llvm/trunk/unittests/IR/IRBuilderTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/IRBuilderTest.cpp?rev=173237&r1=173236&r2=173237&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/IRBuilderTest.cpp (original)
+++ llvm/trunk/unittests/IR/IRBuilderTest.cpp Wed Jan 23 02:30:39 2013
@@ -30,8 +30,8 @@
/*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() {
More information about the llvm-commits
mailing list