[PATCH] D132364: [llvm-size] Fix missing file name for darwin output format with non-Mach-O
Shivam Gupta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 25 05:56:30 PDT 2022
xgupta updated this revision to Diff 455555.
xgupta edited the summary of this revision.
xgupta added a comment.
Address comment and update test case
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132364/new/
https://reviews.llvm.org/D132364
Files:
llvm/test/tools/llvm-size/elf-m.test
llvm/tools/llvm-size/llvm-size.cpp
Index: llvm/tools/llvm-size/llvm-size.cpp
===================================================================
--- llvm/tools/llvm-size/llvm-size.cpp
+++ llvm/tools/llvm-size/llvm-size.cpp
@@ -836,6 +836,8 @@
else if (MachO && OutputFormat == darwin && MoreThanOneFile)
outs() << o->getFileName() << ":\n";
printObjectSectionSizes(o);
+ if (!MachO && OutputFormat == darwin)
+ outs() << o->getFileName() << "\n";
if (OutputFormat == berkeley) {
if (!MachO || MoreThanOneFile)
outs() << o->getFileName();
Index: llvm/test/tools/llvm-size/elf-m.test
===================================================================
--- llvm/test/tools/llvm-size/elf-m.test
+++ llvm/test/tools/llvm-size/elf-m.test
@@ -2,13 +2,11 @@
## specified and the input is not Mach-O.
# RUN: yaml2obj %s -o %t
-# RUN: llvm-size -m %t | FileCheck %s
-# RUN: llvm-size --format=darwin %t | FileCheck %s
+# RUN: llvm-size -m %t | FileCheck -DFILE=%t %s
+# RUN: llvm-size --format=darwin %t | FileCheck -DFILE=%t %s
-## FIXME: The input filename should be printed but isn't currently due to
-## https://bugs.llvm.org/show_bug.cgi?id=42971.
# CHECK: text data bss dec hex filename
-# CHECK-NEXT: 0 0 0 0 0
+# CHECK-NEXT: 0 0 0 0 0 [[FILE]]
--- !ELF
FileHeader:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132364.455555.patch
Type: text/x-patch
Size: 1375 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220825/9488a41b/attachment.bin>
More information about the llvm-commits
mailing list