[PATCH] Refactor/simplify llvm-symbolizer code.

Alexander Potapenko glider at google.com
Mon Oct 20 16:42:49 PDT 2014


Looks mostly good

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:340
@@ +339,3 @@
+  if (!DbgObj) {
+    std::string DebuglinkName;
+    uint32_t CRCHash;
----------------
I suggest to move the .gnu_debuglink part into a helper function so that findDbgObj is more readable.

================
Comment at: tools/llvm-symbolizer/LLVMSymbolize.cpp:357
@@ +356,3 @@
+static ErrorOr<const Binary *>
+getPointer(const ErrorOr<OwningBinary<Binary>> &BinaryOrErr) {
+  if (BinaryOrErr)
----------------
"getBinaryPointer", maybe?

http://reviews.llvm.org/D5874






More information about the llvm-commits mailing list