1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Change llvm-objdump with Mach-O files and the -info-plist option with the

-no-leading-headers option so that it does not print the leading header.

rdar://27378808

llvm-svn: 305849
This commit is contained in:
Kevin Enderby 2017-06-20 21:00:25 +00:00
parent eee230003b
commit c4ac67070a
2 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,11 @@
# RUN: llvm-mc < %s -triple x86_64-apple-darwin -filetype=obj | llvm-objdump -m -info-plist - | FileCheck %s
# RUN: llvm-mc < %s -triple x86_64-apple-darwin -filetype=obj | llvm-objdump -m -info-plist -no-leading-headers - | FileCheck --check-prefix=NOHEADER %s
.section __TEXT, __info_plist
.asciz "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
# CHECK: Contents of (__TEXT,__info_plist) section
# CHECK: <?xml version="1.0" encoding="UTF-8"?>
# NOHEADER-NOT: Contents of (__TEXT,__info_plist) section
# NOHEADER: <?xml version="1.0" encoding="UTF-8"?>

View File

@ -1135,7 +1135,8 @@ static void DumpInfoPlistSectionContents(StringRef Filename,
DataRefImpl Ref = Section.getRawDataRefImpl();
StringRef SegName = O->getSectionFinalSegmentName(Ref);
if (SegName == "__TEXT" && SectName == "__info_plist") {
outs() << "Contents of (" << SegName << "," << SectName << ") section\n";
if (!NoLeadingHeaders)
outs() << "Contents of (" << SegName << "," << SectName << ") section\n";
StringRef BytesStr;
Section.getContents(BytesStr);
const char *sect = reinterpret_cast<const char *>(BytesStr.data());