[PATCH] D128184: [lld-macho] Show source information for undefined references

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 06:30:42 PDT 2022


thakis added a comment.

This looks excellent. Only inconsequential comments :)



================
Comment at: lld/MachO/InputSection.cpp:111
+
+  // First, lookup a function for a given offset.
+  if (Optional<DILineInfo> li = dwarf->getDILineInfo(
----------------
nit: the verb has a space, "look up". ("lookup" is a noun. same for "set up" / "setup".)


================
Comment at: lld/MachO/InputSection.cpp:116
+
+  // If it failed, lookup again as a variable.
+  if (const Defined *sym = getContainingSymbol(off))
----------------
nit: same


================
Comment at: lld/MachO/InputSection.cpp:124
+  if (obj->compileUnit)
+    return obj->sourceFile();
+
----------------
Do we have test coverage of all 3 scenarios (fun, var, file) in this function?


================
Comment at: lld/MachO/SyntheticSections.h:438
 private:
-  void emitBeginSourceStab(llvm::DWARFUnit *compileUnit);
+  void emitBeginSourceStab(std::string);
   void emitEndSourceStab();
----------------
const ref?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128184/new/

https://reviews.llvm.org/D128184



More information about the llvm-commits mailing list