[PATCH] D73586: Suppress spurious warnings when parsing Mach-O bianries.

Michael Trent via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 29 10:17:00 PST 2020


mtrent marked 2 inline comments as done.
mtrent added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/X86/macho-cstring-dump.test:5
 
+CHECK-NOT: warning: section '__TEXT,__cstring' mentioned in a -j/--section option, but not found in any input file
 CHECK: Contents of (__TEXT,__cstring) section
----------------
jhenderson wrote:
> grimar wrote:
> > I'd suggest using `--implicit-check-not="warning:"` FileCheck option instead. Testing the whole message is too brittle approach I think.
> +1. It also means you only need to specify the pattern in one place, rather than the current two.
Sounds good, I'll update the patch.


================
Comment at: llvm/tools/llvm-objdump/MachODump.cpp:1753
     for (const SectionRef &Section : O->sections()) {
-      StringRef SectName;
+      StringRef SectName = StringRef();
       Expected<StringRef> SecNameOrErr = Section.getName();
----------------
grimar wrote:
> Why this line was changed?
Looks like a remnant from an earlier attempt. Probably not needed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73586/new/

https://reviews.llvm.org/D73586





More information about the llvm-commits mailing list