diff options
author | Reid Kleckner <rnk@google.com> | 2016-06-17 20:38:01 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-06-17 20:38:01 +0000 |
commit | 11582c59d799a651db12b47dd690a02204439ed5 (patch) | |
tree | a6fd5e711ccb4bdfe51d55af66722fc3cbe1a0ae /llvm/lib/DebugInfo/PDB | |
parent | d76efc14b9eebfc6c176a2b8a16bf661e2ab803c (diff) | |
download | bcm5719-llvm-11582c59d799a651db12b47dd690a02204439ed5.tar.gz bcm5719-llvm-11582c59d799a651db12b47dd690a02204439ed5.zip |
[pdb] Don't error on missing FPO streams
64-bit PDBs never have FPO data. They have xdata instead.
Also improve error recovery of stream summary dumping while I'm here.
llvm-svn: 273046
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp index ae3faa700c1..eba09bf0601 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/DbiStream.cpp @@ -316,6 +316,11 @@ Error DbiStream::initializeSectionHeadersData() { // Initializes this->Fpos. Error DbiStream::initializeFpoRecords() { uint32_t StreamNum = getDebugStreamIndex(DbgHeaderType::NewFPO); + + // This means there is no FPO data. + if (StreamNum == InvalidStreamIndex) + return Error::success(); + if (StreamNum >= Pdb.getNumStreams()) return make_error<RawError>(raw_error_code::no_stream); |