[PATCH] D75668: [DebugInfo] Print the actual value of an unknown section identifier.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 02:46:30 PST 2020


ikudrin marked 2 inline comments as done.
ikudrin added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp:121
   }
-  return "<unknown>";
+  return StringRef();
 }
----------------
dblaikie wrote:
> Might be simpler to write this as `return "";`
I believe I would better stick with `StringRef()`. This is the same way as other stringify functions are written, in particular, in `Dwarf.cpp`, and, as I checked, the compiler generates a bit better code with the default constructor of `StringRef`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75668





More information about the llvm-commits mailing list