summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/IRBuilderTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/unittests/IR/IRBuilderTest.cpp')
-rw-r--r--llvm/unittests/IR/IRBuilderTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/unittests/IR/IRBuilderTest.cpp b/llvm/unittests/IR/IRBuilderTest.cpp
index 5f3aac05b11..0c602ed2b78 100644
--- a/llvm/unittests/IR/IRBuilderTest.cpp
+++ b/llvm/unittests/IR/IRBuilderTest.cpp
@@ -313,10 +313,12 @@ TEST_F(IRBuilderTest, DIBuilder) {
auto CU = DIB.createCompileUnit(dwarf::DW_LANG_Cobol74, "F.CBL", "/",
"llvm-cobol74", true, "", 0);
auto Type = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
- DIB.createFunction(CU, "foo", "", File, 1, Type, false, true, 1, 0, true, F);
+ auto SP =
+ DIB.createFunction(CU, "foo", "", File, 1, Type, false, true, 1, 0, true);
+ F->setSubprogram(SP);
AllocaInst *I = Builder.CreateAlloca(Builder.getInt8Ty());
- auto BarSP = DIB.createFunction(CU, "bar", "", File, 1, Type, false, true, 1,
- 0, true, nullptr);
+ auto BarSP =
+ DIB.createFunction(CU, "bar", "", File, 1, Type, false, true, 1, 0, true);
auto BadScope = DIB.createLexicalBlockFile(BarSP, File, 0);
I->setDebugLoc(DebugLoc::get(2, 0, BadScope));
DIB.finalize();
OpenPOWER on IntegriCloud