[PATCH] D23731: [ELF] Only print symbol name when it is available

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 21 21:32:42 PDT 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM with nits.


================
Comment at: ELF/Relocations.cpp:413
@@ +412,3 @@
+  if (Body.isLocal() && Body.getNameOffset())
+    return getLocalSymbolName(File, Body);
+  else if (!Body.isLocal())
----------------
Now that this is the only place where `getLocalSymbolName` is called, so let's inline that function and remove `getLocalSymbolName`.

================
Comment at: ELF/Relocations.cpp:414
@@ +413,3 @@
+    return getLocalSymbolName(File, Body);
+  else if (!Body.isLocal())
+    return Body.getName();
----------------
Remove `else` after `return`.


https://reviews.llvm.org/D23731





More information about the llvm-commits mailing list