Revert r358418: "[llvm-objdump] Simplify PrintHelpMessage() logic"

This reverts commit r358418 as it broke `test/Object/objdump-export-list`
on Darwin.

llvm-svn: 358443
This commit is contained in:
Alex Lorenz 2019-04-15 20:16:19 +00:00
parent 13532ea623
commit 16256123d0
2 changed files with 29 additions and 10 deletions

View File

@ -1,4 +1,4 @@
// RUN: llvm-objdump -macho -private-header %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
// RUN: llvm-objdump -private-header %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s
CHECK: Mach header
CHECK: magic cputype cpusubtype caps filetype ncmds sizeofcmds flags

View File

@ -2021,15 +2021,34 @@ int main(int argc, char **argv) {
if (DisassembleAll || PrintSource || PrintLines)
Disassemble = true;
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()))) {
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) {
cl::PrintHelpMessage();
return 2;
}