[PATCH] D47414: [llvm-objcopy] Fix null symbol handling

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 31 07:09:47 PDT 2018


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

LGTM with the inline comments, but please wait for @alexshap or @jakehehrlich to confirm they're happy.



================
Comment at: test/tools/llvm-objcopy/null-symbol.test:21
+#CHECK-NEXT:  Symbol {
+#CHECK-NEXT:    Name:{{[ ]*}}(0)
+#CHECK-NEXT:    Value: 0x0
----------------
I think this can be simplified to `Name: (0)`. Whitespace (except new lines) is not significant for FileCheck, except to divide other non-whitespace, i.e. `Name:    (0)` (many spaces) is identical to `Name: (0)` (one space) but not `Name:(0)` (no spaces).


================
Comment at: tools/llvm-objcopy/Object.cpp:203-205
+  for (auto Sym = std::begin(Symbols) + 1, E = std::end(Symbols); Sym != E;
+       ++Sym)
+    Callable(**Sym);
----------------
Hmm... now that I think about it, could we use std::for_each here?


Repository:
  rL LLVM

https://reviews.llvm.org/D47414





More information about the llvm-commits mailing list