forked from OSchip/llvm-project
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
6a8704c1c0
commit
5997c9480b
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