summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbutil/InputFile.cpp
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2018-04-09 20:17:56 +0000
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2018-04-09 20:17:56 +0000
commitd9e96741c464f35722bbbb4d11bb7fa7c6f4fb21 (patch)
tree450fa7f2b11c3954d3beb58f6d587468428b5f8b /llvm/tools/llvm-pdbutil/InputFile.cpp
parent69a2e18b4aeafad0e30091fb5f9c191e6d1c2df4 (diff)
downloadbcm5719-llvm-d9e96741c464f35722bbbb4d11bb7fa7c6f4fb21.tar.gz
bcm5719-llvm-d9e96741c464f35722bbbb4d11bb7fa7c6f4fb21.zip
[Debuginfo][COFF] Minimal serialization support for precompiled types records
This change adds support for the LF_PRECOMP and LF_ENDPRECOMP records required to read/write Microsoft precompiled types .objs. See https://en.wikipedia.org/wiki/Precompiled_header#Microsoft_Visual_C_and_C++ This also adds handling for the .debug$P section, which is actually a .debug$T section in disguise, found only in precompiled .objs. Differential Revision: https://reviews.llvm.org/D45283 llvm-svn: 329613
Diffstat (limited to 'llvm/tools/llvm-pdbutil/InputFile.cpp')
-rw-r--r--llvm/tools/llvm-pdbutil/InputFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-pdbutil/InputFile.cpp b/llvm/tools/llvm-pdbutil/InputFile.cpp
index 3695cbfc4f9..7b5af7e9692 100644
--- a/llvm/tools/llvm-pdbutil/InputFile.cpp
+++ b/llvm/tools/llvm-pdbutil/InputFile.cpp
@@ -95,7 +95,8 @@ static inline bool isDebugSSection(object::SectionRef Section,
static bool isDebugTSection(SectionRef Section, CVTypeArray &Types) {
BinaryStreamReader Reader;
- if (!isCodeViewDebugSubsection(Section, ".debug$T", Reader))
+ if (!isCodeViewDebugSubsection(Section, ".debug$T", Reader) &&
+ !isCodeViewDebugSubsection(Section, ".debug$P", Reader))
return false;
cantFail(Reader.readArray(Types, Reader.bytesRemaining()));
return true;
OpenPOWER on IntegriCloud