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

Alexey Samsonov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 10:10:23 PST 2015


samsonov added a comment.

Looks almost fine, minor remaining comments below.


================
Comment at: docs/CommandGuide/llvm-symbolizer.rst:113
@@ +112,3 @@
+.. option:: -pretty-print
+ Print human readable output. If -inlining is specified, enclosing scope is
+ prefixed by (inlined by). Refer listed examples.
----------------
You probably need to enclose "-inlining" in double ticks as we do with other flags (check generated file).

================
Comment at: docs/CommandGuide/llvm-symbolizer.rst:114
@@ +113,3 @@
+ Print human readable output. If -inlining is specified, enclosing scope is
+ prefixed by (inlined by). Refer listed examples.
+
----------------
Grammar: "refer to"

================
Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:33
@@ +32,3 @@
+
+    StringRef delimiter = (PrintPretty == true) ? " at " : "\n";
+    StringRef prefix = (PrintPretty && Inlined) ? " (inlined by) " : "";
----------------
Delimiter (CamelCase)

================
Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:35
@@ -33,1 +34,3 @@
+    StringRef prefix = (PrintPretty && Inlined) ? " (inlined by) " : "";
+    OS <<  prefix.str() + FunctionName + delimiter.str();
   }
----------------
OS << Prefix << FunctionName << Delimiter;

================
Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:41
@@ +40,3 @@
+  OS <<  Filename <<  ":" << std::to_string(Info.Line) << ":"
+     <<   std::to_string(Info.Column) << "\n";
+}
----------------
run this with clang-format.

================
Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:56-57
@@ -45,3 +55,4 @@
   for (uint32_t i = 0; i < FramesNum; i++) {
-    *this << Info.getFrame(i);
+    const DILineInfo info = Info.getFrame(i);
+    printName(info, i > 0);
   }
----------------
Please address


http://reviews.llvm.org/D13671





More information about the llvm-commits mailing list