InstrProf: Simplify some logic by using ArrayRef::slice (NFC)
[oota-llvm.git] / unittests / IR / IRBuilderTest.cpp
index c8670f23cbe08928d0370de939d78e270e317c52..08a729aba5061f61fb8a79058cca353c5528c86e 100644 (file)
@@ -294,7 +294,7 @@ 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(None));
   auto SP = DIB.createFunction(CU, "foo", "", File, 1, Type,
                                false, true, 1, 0, true, F);
   EXPECT_TRUE(SP.Verify());
@@ -302,6 +302,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();
 }