[PATCH] D56346: [dsymutil] Update unobfuscation logic.

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 7 14:37:31 PST 2019


JDevlieghere added inline comments.


================
Comment at: llvm/tools/dsymutil/DwarfStreamer.cpp:597
+  if (Version > 5) {
+    warn("Unsupported line table version: dropping contents and not "
+         "unobfsucating line table.");
----------------
aprantl wrote:
> Any plans to implement this soon?
Soon, hopefully :-) 


================
Comment at: llvm/tools/dsymutil/SymbolMap.cpp:133
+  bool MangleNames = false;
+  if (!LHS.startswith("BCSymbolMap Version:")) {
+    // Version string not present, warns but try to parse it.
----------------
aprantl wrote:
> perhaps use StringRef::consume() for premature optimization?
I tried but this makes the code more complicated because we need to account for either the version number missing or the whole thing missing. 


================
Comment at: llvm/tools/dsymutil/SymbolMap.h:26
+
+  SymbolMapTranslator(std::vector<std::string> UnobfuscatedStrings,
+                      bool MangleNames)
----------------
aprantl wrote:
> ArrayRef or && or const& perhaps?
Neither would improve performance as we're moving it into a member. I believe it's customary to take the argument by value in this case (although an r-value reference would be equivalent). 


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

https://reviews.llvm.org/D56346





More information about the llvm-commits mailing list