mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[llvm-objdump] Simplify PrintHelpMessage() logic
This relands rL358418. It missed one test that should also use -macho Note, all the other -private-header -exports-trie tests are used together with -macho. llvm-svn: 358472
This commit is contained in:
parent
e7b5dee27a
commit
261a4024d0
@ -1,4 +1,5 @@
|
||||
RUN: llvm-objdump -exports-trie %p/Inputs/macho-no-exports.dylib | FileCheck %s
|
||||
RUN: llvm-objdump -macho -exports-trie %p/Inputs/macho-no-exports.dylib | FileCheck %s
|
||||
|
||||
; Test that we don't crash with an empty export list.
|
||||
CHECK: macho-no-exports.dylib: file format Mach-O 64-bit x86-64
|
||||
CHECK: macho-no-exports.dylib
|
||||
CHECK: Exports trie:
|
||||
|
@ -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
|
||||
|
@ -2008,34 +2008,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 || ObjcMetaData || Rebase || UniversalHeaders ||
|
||||
WeakBind || !FilterSections.empty()))) {
|
||||
cl::PrintHelpMessage();
|
||||
return 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user