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

Paul Semel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 1 03:20:30 PDT 2018


paulsemel added inline comments.


================
Comment at: test/tools/llvm-objcopy/null-symbol.test:21
+#CHECK-NEXT:  Symbol {
+#CHECK-NEXT:    Name:{{[ ]*}}(0)
+#CHECK-NEXT:    Value: 0x0
----------------
jhenderson wrote:
> 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).
Thanks for the tips :)


================
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);
----------------
jhenderson wrote:
> Hmm... now that I think about it, could we use std::for_each here?
Actually yes :)


Repository:
  rL LLVM

https://reviews.llvm.org/D47414





More information about the llvm-commits mailing list