[PATCH] D69592: [ELF] Suggest the unmangled name as an alternative spelling

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 03:08:42 PDT 2019


grimar added inline comments.


================
Comment at: lld/ELF/Relocations.cpp:764
+  // suggesting the part before (.
+  std::string demangled = toString(sym);
+  auto paren = demangled.find('(');
----------------
I wonder if we might want to check `if (name.startswith("_Z"))` first. It might save a bit of calculations and isolate the logic a bit.


================
Comment at: lld/ELF/Relocations.cpp:765
+  std::string demangled = toString(sym);
+  auto paren = demangled.find('(');
+  if (paren != StringRef::npos) {
----------------
auto -> size_t ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69592





More information about the llvm-commits mailing list