diff options
author | George Rimar <grimar@accesssoftek.com> | 2019-01-15 09:19:18 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2019-01-15 09:19:18 +0000 |
commit | 73a272354df69daf1c4869af61e153939b3bbe52 (patch) | |
tree | b4211c97c9c51d89789fdca0acc757b65d7a2f9d /llvm/tools/llvm-objdump/MachODump.cpp | |
parent | 226af75a02e2d69cb9dd0371f990df3b2d2b4a01 (diff) | |
download | bcm5719-llvm-73a272354df69daf1c4869af61e153939b3bbe52.tar.gz bcm5719-llvm-73a272354df69daf1c4869af61e153939b3bbe52.zip |
[llvm-objdump] - Cleanup the code. NFCI.
This is a cosmetic cleanup for the llvm-objdump code.
This patch:
* Renames things to match the official LLVM code style (lower case -> upper case).
* Removes few obviously excessive variables.
* Moves a few lines closer to the place of use, reorders the code a bit to simplify it,
to avoid doing excessive returns and to avoid using 'else` after returns.
I focused only on a llvm-objdump.h/llvm-objdump.cpp files. Few changes in the
MachODump.cpp and COFFDump.cpp are a result of llvm-objdump.h modification.
Differential revision: https://reviews.llvm.org/D56637
llvm-svn: 351171
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/MachODump.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp index 397573e2a48..c8707ac1183 100644 --- a/llvm/tools/llvm-objdump/MachODump.cpp +++ b/llvm/tools/llvm-objdump/MachODump.cpp @@ -1627,9 +1627,9 @@ static void ProcessMachO(StringRef Name, MachOObjectFile *MachOOF, if (Relocations) PrintRelocations(MachOOF, !NonVerbose); if (SectionHeaders) - PrintSectionHeaders(MachOOF); + printSectionHeaders(MachOOF); if (SectionContents) - PrintSectionContents(MachOOF); + printSectionContents(MachOOF); if (!FilterSections.empty()) DumpSectionContents(FileName, MachOOF, !NonVerbose); if (InfoPlist) @@ -1639,7 +1639,7 @@ static void ProcessMachO(StringRef Name, MachOObjectFile *MachOOF, if (DylibId) PrintDylibs(MachOOF, true); if (SymbolTable) - PrintSymbolTable(MachOOF, ArchiveName, ArchitectureName); + printSymbolTable(MachOOF, ArchiveName, ArchitectureName); if (UnwindInfo) printMachOUnwindInfo(MachOOF); if (PrivateHeaders) { @@ -1959,7 +1959,7 @@ static bool ValidateArchFlags() { // -arch flags selecting just those slices as specified by them and also parses // archive files. Then for each individual Mach-O file ProcessMachO() is // called to process the file based on the command line options. -void llvm::ParseInputMachO(StringRef Filename) { +void llvm::parseInputMachO(StringRef Filename) { if (!ValidateArchFlags()) return; @@ -1998,7 +1998,7 @@ void llvm::ParseInputMachO(StringRef Filename) { return; } if (MachOUniversalBinary *UB = dyn_cast<MachOUniversalBinary>(&Bin)) { - ParseInputMachO(UB); + parseInputMachO(UB); return; } if (ObjectFile *O = dyn_cast<ObjectFile>(&Bin)) { @@ -2015,7 +2015,7 @@ void llvm::ParseInputMachO(StringRef Filename) { llvm_unreachable("Input object can't be invalid at this point"); } -void llvm::ParseInputMachO(MachOUniversalBinary *UB) { +void llvm::parseInputMachO(MachOUniversalBinary *UB) { if (!ValidateArchFlags()) return; |