[PATCH] D13671: Add -pretty-print option to llvm-symbolizer

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 12:14:28 PDT 2015


samsonov added inline comments.

================
Comment at: docs/CommandGuide/llvm-symbolizer.rst:105
@@ +104,3 @@
+.. option:: -pretty-print
+ Print human readable line information.
+
----------------
Consider providing more details about the output difference (closer to how -pretty-print is described in "man addr2line"). You can also expand EXAMPLE section.

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.h:49
@@ -47,3 +48,3 @@
             bool Demangle = true, bool RelativeAddresses = false,
-            std::string DefaultArch = "")
+            std::string DefaultArch = "", bool PrintPretty = false)
         : PrintFunctions(PrintFunctions), UseSymbolTable(UseSymbolTable),
----------------
Let's keep the same order of members and ctor args.

================
Comment at: tools/llvm-symbolizer/llvm-symbolizer.cpp:164
@@ -160,2 +163,3 @@
       outs().write_hex(ModuleOffset);
-      outs() << "\n";
+      if (!ClPrettyPrint)
+        outs() << "\n";
----------------
You can just use ternary operator here (and above).


Repository:
  rL LLVM

http://reviews.llvm.org/D13671





More information about the llvm-commits mailing list