mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-18 18:42:46 +02:00
Fix memory leak in unittest added in r241101.
llvm-svn: 241123
This commit is contained in:
parent
cd7100d557
commit
8f755821c9
@ -342,9 +342,11 @@ TEST_F(IRBuilderTest, DebugLoc) {
|
||||
|
||||
DIBuilder DIB(*M);
|
||||
auto File = DIB.createFile("tmp.cpp", "/");
|
||||
auto CU = DIB.createCompileUnit(dwarf::DW_LANG_C_plus_plus_11, "tmp.cpp", "/",
|
||||
"", true, "", 0);
|
||||
auto SPType = DIB.createSubroutineType(File, DIB.getOrCreateTypeArray(None));
|
||||
auto SP =
|
||||
DIB.createFunction(File, "foo", "foo", File, 1, SPType, false, true, 1);
|
||||
DIB.createFunction(CU, "foo", "foo", File, 1, SPType, false, true, 1);
|
||||
DebugLoc DL1 = DILocation::get(Ctx, 2, 0, SP);
|
||||
DebugLoc DL2 = DILocation::get(Ctx, 3, 0, SP);
|
||||
|
||||
@ -363,5 +365,7 @@ TEST_F(IRBuilderTest, DebugLoc) {
|
||||
EXPECT_EQ(DL2, Builder.getCurrentDebugLocation());
|
||||
auto Call2 = Builder.CreateCall(Callee, None);
|
||||
EXPECT_EQ(DL2, Call2->getDebugLoc());
|
||||
|
||||
DIB.finalize();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user