[llvm] [MC] output inlined-at debug info (PR #106230)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 24 10:57:24 PDT 2024
================
@@ -2056,6 +2056,14 @@ void DwarfDebug::beginInstruction(const MachineInstr *MI) {
}
}
+ auto RecordSourceLine = [&](auto &DL, auto Flags) {
+ SmallString<128> LocationString;
+ raw_svector_ostream OS(LocationString);
+ DL.print(OS);
+
+ const MDNode *Scope = DL.getScope();
+ recordSourceLine(DL.getLine(), DL.getCol(), Scope, Flags, LocationString);
----------------
Artem-B wrote:
Perhaps we should change `recordSourceLine()` to accept `DebugLoc` argument, instead of Line/Col/LocationString, ad do all the data extraction from `DL` there, in one place. That would obviate the need for this lambda.
https://github.com/llvm/llvm-project/pull/106230
More information about the llvm-commits
mailing list