diff options
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp | 9 | ||||
-rw-r--r-- | llvm/tools/llvm-readobj/COFFDumper.cpp | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp index 111dcfba9af..eec1a744500 100644 --- a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp @@ -1058,8 +1058,15 @@ Error DumpOutputStyle::dumpTypesFromObjectFile() { if (auto EC = S.getName(SectionName)) return errorCodeToError(EC); - if (SectionName != ".debug$T") + // .debug$T is a standard CodeView type section, while .debug$P is the same + // format but used for MSVC precompiled header object files. + if (SectionName == ".debug$T") + printHeader(P, "Types (.debug$T)"); + else if (SectionName == ".debug$P") + printHeader(P, "Precompiled Types (.debug$P)"); + else continue; + StringRef Contents; if (auto EC = S.getContents(Contents)) return errorCodeToError(EC); diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp index 5d6bcc65baf..2567d6dc159 100644 --- a/llvm/tools/llvm-readobj/COFFDumper.cpp +++ b/llvm/tools/llvm-readobj/COFFDumper.cpp @@ -902,7 +902,9 @@ void COFFDumper::printCodeViewDebugInfo() { for (const SectionRef &S : Obj->sections()) { StringRef SectionName; error(S.getName(SectionName)); - if (SectionName == ".debug$T") + // .debug$T is a standard CodeView type section, while .debug$P is the same + // format but used for MSVC precompiled header object files. + if (SectionName == ".debug$T" || SectionName == ".debug$P") printCodeViewTypeSection(SectionName, S); } for (const SectionRef &S : Obj->sections()) { |