[llvm] BPF: Use DebugLoc to find Filename for BTF line info (PR #90302)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 26 19:36:18 PDT 2024


================
@@ -1389,8 +1388,7 @@ void BTFDebug::beginInstruction(const MachineInstr *MI) {
   OS.emitLabel(LineSym);
 
   // Construct the lineinfo.
-  auto SP = DL->getScope()->getSubprogram();
-  constructLineInfo(SP, LineSym, DL.getLine(), DL.getCol());
+  constructLineInfo(LineSym, DL.get()->getFile(), DL.getLine(), DL.getCol());
----------------
yonghong-song wrote:

Good point! Just make the change to do 'DL->getFile()' directly.

https://github.com/llvm/llvm-project/pull/90302


More information about the llvm-commits mailing list