mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
Fix a bug with llvm-size and the -m option with multiple files not printing the file names.
llvm-svn: 288402
This commit is contained in:
parent
b5f6149fa0
commit
10300762c8
BIN
test/tools/llvm-size/Inputs/darwin-m1.o
Normal file
BIN
test/tools/llvm-size/Inputs/darwin-m1.o
Normal file
Binary file not shown.
@ -1,7 +1,11 @@
|
||||
RUN: llvm-size -m %p/Inputs/darwin-m.o | FileCheck --check-prefix="DARWIN" %s
|
||||
RUN: llvm-size -m %p/Inputs/darwin-m.o %p/Inputs/darwin-m1.o | FileCheck --check-prefix="DARWIN2" %s
|
||||
|
||||
DARWIN: Segment : 8
|
||||
DARWIN-NEXT: Section (__TEXT, __text): 4
|
||||
DARWIN-NEXT: Section (__DATA, __data): 4
|
||||
DARWIN-NEXT: total 8
|
||||
DARWIN-NEXT: total 8
|
||||
|
||||
DARWIN2: Inputs/darwin-m.o:
|
||||
DARWIN2: Inputs/darwin-m1.o:
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user