Skip to content

Commit 1b79150

Browse files
authored
[DebugInfo] Drop extra DIBuilder::finalizeSubprogram() calls (NFC) (#155618)
After #139914, `DIBilder::finalize()` finalizes both declaration and definition DISubprograms. Therefore, there is no need to call `DIBuilder::finalizeSubprogram()` right before `DIBilder::finalize()`.
1 parent a69a464 commit 1b79150

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

llvm/lib/CodeGen/MachineOutliner.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,6 @@ MachineFunction *MachineOutliner::createOutlinedFunction(
10171017
/* Outlined code is optimized code by definition. */
10181018
DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized);
10191019

1020-
// Don't add any new variables to the subprogram.
1021-
DB.finalizeSubprogram(OutlinedSP);
1022-
10231020
// Attach subprogram to the function.
10241021
F->setSubprogram(OutlinedSP);
10251022
// We're done with the DIBuilder.

llvm/lib/Transforms/IPO/IROutliner.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,6 @@ Function *IROutliner::createFunction(Module &M, OutlinableGroup &Group,
686686
/* Outlined code is optimized code by definition. */
687687
DISubprogram::SPFlagDefinition | DISubprogram::SPFlagOptimized);
688688

689-
// Don't add any new variables to the subprogram.
690-
DB.finalizeSubprogram(OutlinedSP);
691-
692689
// Attach subprogram to the function.
693690
F->setSubprogram(OutlinedSP);
694691
// We're done with the DIBuilder.

llvm/lib/Transforms/Utils/Debugify.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ bool llvm::applyDebugifyMetadata(
254254
}
255255
if (ApplyToMF)
256256
ApplyToMF(DIB, F);
257-
DIB.finalizeSubprogram(SP);
258257
}
259258
DIB.finalize();
260259

0 commit comments

Comments
 (0)