[llvm] r358418 - [llvm-objdump] Simplify PrintHelpMessage() logic

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 11:07:08 PDT 2019


We're seeing test failures in lld after this change:
https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket.appspot.com/8916097779209795744/+/steps/clang/0/steps/test/0/stdout

On Mon, Apr 15, 2019 at 8:50 AM Fangrui Song via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: maskray
> Date: Mon Apr 15 08:52:32 2019
> New Revision: 358418
>
> URL: http://llvm.org/viewvc/llvm-project?rev=358418&view=rev
> Log:
> [llvm-objdump] Simplify PrintHelpMessage() logic
>
> Modified:
>     llvm/trunk/test/tools/llvm-objdump/X86/macho-private-header.test
>     llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
>
> Modified: llvm/trunk/test/tools/llvm-objdump/X86/macho-private-header.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/X86/macho-private-header.test?rev=358418&r1=358417&r2=358418&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-objdump/X86/macho-private-header.test
> (original)
> +++ llvm/trunk/test/tools/llvm-objdump/X86/macho-private-header.test Mon
> Apr 15 08:52:32 2019
> @@ -1,4 +1,4 @@
> -// RUN: llvm-objdump -private-header %p/Inputs/hello.obj.macho-x86_64 |
> FileCheck %s
> +// RUN: llvm-objdump -macho -private-header
> %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
>
>  CHECK: Mach header
>  CHECK:       magic cputype cpusubtype  caps    filetype ncmds sizeofcmds
>     flags
>
> Modified: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=358418&r1=358417&r2=358418&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp (original)
> +++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp Mon Apr 15 08:52:32 2019
> @@ -2021,34 +2021,15 @@ int main(int argc, char **argv) {
>    if (DisassembleAll || PrintSource || PrintLines)
>      Disassemble = true;
>
> -  if (!Disassemble
> -      && !Relocations
> -      && !DynamicRelocations
> -      && !SectionHeaders
> -      && !SectionContents
> -      && !SymbolTable
> -      && !UnwindInfo
> -      && !PrivateHeaders
> -      && !FileHeaders
> -      && !FirstPrivateHeader
> -      && !ExportsTrie
> -      && !Rebase
> -      && !Bind
> -      && !LazyBind
> -      && !WeakBind
> -      && !RawClangAST
> -      && !(UniversalHeaders && MachOOpt)
> -      && !ArchiveHeaders
> -      && !(IndirectSymbols && MachOOpt)
> -      && !(DataInCode && MachOOpt)
> -      && !(LinkOptHints && MachOOpt)
> -      && !(InfoPlist && MachOOpt)
> -      && !(DylibsUsed && MachOOpt)
> -      && !(DylibId && MachOOpt)
> -      && !(ObjcMetaData && MachOOpt)
> -      && !(!FilterSections.empty() && MachOOpt)
> -      && !FaultMapSection
> -      && DwarfDumpType == DIDT_Null) {
> +  if (!ArchiveHeaders && !Disassemble && DwarfDumpType == DIDT_Null &&
> +      !DynamicRelocations && !FileHeaders && !PrivateHeaders &&
> !RawClangAST &&
> +      !Relocations && !SectionHeaders && !SectionContents && !SymbolTable
> &&
> +      !UnwindInfo && !FaultMapSection &&
> +      !(MachOOpt &&
> +        (Bind || DataInCode || DylibId || DylibsUsed || ExportsTrie ||
> +         FirstPrivateHeader || IndirectSymbols || InfoPlist || LazyBind ||
> +         LinkOptHints || Rebase || ObjcMetaData || UniversalHeaders ||
> +         WeakBind || !FilterSections.empty()))) {
>      cl::PrintHelpMessage();
>      return 2;
>    }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190415/41264e89/attachment.html>


More information about the llvm-commits mailing list