diff options
Diffstat (limited to 'llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r-- | llvm/unittests/IR/IRBuilderTest.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp index ca378a37cd5..3901fb85434 100644 --- a/llvm/unittests/IR/IRBuilderTest.cpp +++ b/llvm/unittests/IR/IRBuilderTest.cpp @@ -299,7 +299,9 @@ TEST_F(IRBuilderTest, DIBuilder) { false, true, 1, 0, true, F); EXPECT_TRUE(SP.Verify()); AllocaInst *I = Builder.CreateAlloca(Builder.getInt8Ty()); - auto BadScope = DIB.createLexicalBlockFile(DIDescriptor(), File, 0); + auto BarSP = DIB.createFunction(CU, "bar", "", File, 1, Type, false, true, 1, + 0, true, nullptr); + auto BadScope = DIB.createLexicalBlockFile(BarSP, File, 0); I->setDebugLoc(DebugLoc::get(2, 0, BadScope)); EXPECT_FALSE(SP.Verify()); DIB.finalize(); |