[llvm] 72f6ea6 - [llvm-objdump][COFF] Keep columns aligned in the console output when exports ordinals are large.

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 06:56:05 PDT 2023


Author: Alexandre Ganea
Date: 2023-05-03T09:55:55-04:00
New Revision: 72f6ea650e1d64c79ce0e70622c26c6cfeb95836

URL: https://github.com/llvm/llvm-project/commit/72f6ea650e1d64c79ce0e70622c26c6cfeb95836
DIFF: https://github.com/llvm/llvm-project/commit/72f6ea650e1d64c79ce0e70622c26c6cfeb95836.diff

LOG: [llvm-objdump][COFF] Keep columns aligned in the console output when exports ordinals are large.

Added: 
    

Modified: 
    llvm/tools/llvm-objdump/COFFDump.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-objdump/COFFDump.cpp b/llvm/tools/llvm-objdump/COFFDump.cpp
index c608460e39cf3..56daee554eaaf 100644
--- a/llvm/tools/llvm-objdump/COFFDump.cpp
+++ b/llvm/tools/llvm-objdump/COFFDump.cpp
@@ -559,9 +559,9 @@ static void printExportTable(const COFFObjectFile *Obj) {
       // Export table entries can be used to re-export symbols that
       // this COFF file is imported from some DLLs. This is rare.
       // In most cases IsForwarder is false.
-      outs() << format("    % 4d         ", Ordinal);
+      outs() << format("   %5d         ", Ordinal);
     } else {
-      outs() << format("    % 4d %# 8x", Ordinal, RVA);
+      outs() << format("   %5d %# 8x", Ordinal, RVA);
     }
 
     StringRef Name;


        


More information about the llvm-commits mailing list