From: Adrian Prantl Date: Wed, 21 Jan 2015 19:25:35 +0000 (+0000) Subject: Fix a compile issue on MSVC and call finalize(). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8737be85f6210693b6693b00cc425a2ad2a9a6c7;p=llvm Fix a compile issue on MSVC and call finalize(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226694 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/IR/IRBuilderTest.cpp b/unittests/IR/IRBuilderTest.cpp index c8670f23cbe..018914da8c9 100644 --- a/unittests/IR/IRBuilderTest.cpp +++ b/unittests/IR/IRBuilderTest.cpp @@ -294,7 +294,9 @@ TEST_F(IRBuilderTest, DIBuilder) { auto File = DIB.createFile("F.CBL", "/"); auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/", "llvm-cobol74", true, "", 0); - auto Type = DIB.createSubroutineType(File, DIB.getOrCreateTypeArray({})); + auto Type = + DIB.createSubroutineType(File, + DIB.getOrCreateTypeArray(ArrayRef())); auto SP = DIB.createFunction(CU, "foo", "", File, 1, Type, false, true, 1, 0, true, F); EXPECT_TRUE(SP.Verify()); @@ -302,6 +304,7 @@ TEST_F(IRBuilderTest, DIBuilder) { auto BadScope = DIB.createLexicalBlockFile(DIDescriptor(), File, 0); I->setDebugLoc(DebugLoc::get(2, 0, BadScope)); EXPECT_FALSE(SP.Verify()); + DIB.finalize(); }