Fix a compile issue on MSVC and call finalize().

llvm-svn: 226694
This commit is contained in:
Adrian Prantl 2015-01-21 19:25:35 +00:00
parent 163e4768c0
commit 53d382fcc7
1 changed files with 4 additions and 1 deletions

View File

@ -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<Metadata*>()));
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();
}