[PATCH] D81205: [dsymutil] Don't emit N_AST symbol entries in the Mach-O companion file

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 19:51:37 PDT 2020


JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.


================
Comment at: llvm/tools/dsymutil/MachOUtils.cpp:167
+  // Do not transfer AST or OSO symbols as they're only needed by dsymutil.
+  if (NList.n_type == MachO::N_AST || NList.n_type == MachO::N_OSO)
+    return false;
----------------
friss wrote:
> JDevlieghere wrote:
> > Previously the code below would filter out `N_OSO` entries, relying on the fact that `N_OSO` entries come after `N_SO` entries. That means that technically the `N_OSO` could be omitted here, but I think this is much clearer. 
> It's not only the `N_OSO` entries. The debugging entries are somewhat hierarchical and the top-level element is `N_SO`. An `N_SO` with a filename opens a debugging scope and another one without a name closes it. We don't transfer anything that is in the debug scope (`N_OSO`, `N_FUN`, `N_ENSYM`, `N_BNSYM` in the example I'm looking at).
So would you prefer to add a comment below describing this and removing it from the if clause?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81205





More information about the llvm-commits mailing list