summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-12-01 19:12:55 +0000
committerKevin Enderby <enderby@apple.com>2016-12-01 19:12:55 +0000
commit5997c9480bca272333139cb79a17f2436c055412 (patch)
tree7194b620be6e7eb9ef75cd738ed19b3ea9ec89a8 /llvm/tools
parent6a8704c1c0fee0b1394339b28b0c247098ec0276 (diff)
downloadbcm5719-llvm-5997c9480bca272333139cb79a17f2436c055412.tar.gz
bcm5719-llvm-5997c9480bca272333139cb79a17f2436c055412.zip
Fix a bug with llvm-size and the -m option with multiple files not printing the file names.
llvm-svn: 288402
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-size/llvm-size.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-size/llvm-size.cpp b/llvm/tools/llvm-size/llvm-size.cpp
index a11532a7c98..903e950bc73 100644
--- a/llvm/tools/llvm-size/llvm-size.cpp
+++ b/llvm/tools/llvm-size/llvm-size.cpp
@@ -817,11 +817,13 @@ static void printFileSectionSizes(StringRef file) {
} else if (ObjectFile *o = dyn_cast<ObjectFile>(&Bin)) {
if (!checkMachOAndArchFlags(o, file))
return;
+ MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
if (OutputFormat == sysv)
outs() << o->getFileName() << " :\n";
+ else if (MachO && OutputFormat == darwin && MoreThanOneFile)
+ outs() << o->getFileName() << ":\n";
printObjectSectionSizes(o);
if (OutputFormat == berkeley) {
- MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o);
if (!MachO || MoreThanOneFile)
outs() << o->getFileName();
outs() << "\n";
OpenPOWER on IntegriCloud