summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-10-11 00:15:50 +0000
committerRui Ueyama <ruiu@google.com>2016-10-11 00:15:50 +0000
commit8af4988f35e0e8fbd1096f785904af9a94116ef8 (patch)
tree4404cafa89d5685cf61c7c721ba2fadf5485ad02 /llvm/lib/DebugInfo/PDB/Raw
parent8838db8a9d07f6ce64a0903471643ce74da3a602 (diff)
downloadbcm5719-llvm-8af4988f35e0e8fbd1096f785904af9a94116ef8.tar.gz
bcm5719-llvm-8af4988f35e0e8fbd1096f785904af9a94116ef8.zip
Revert r283824 and r283823: Define DbiStreamBuilder::addDbgStream to add stream.
This reverts commit r283824 and r283823 to fix buildbots. llvm-svn: 283828
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp32
1 files changed, 2 insertions, 30 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
index 55c3c0a2ca8..bb0e730edd3 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
@@ -9,7 +9,6 @@
#include "llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h"
-#include "llvm/ADT/ArrayRef.h"
#include "llvm/DebugInfo/MSF/MSFBuilder.h"
#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
#include "llvm/DebugInfo/MSF/StreamWriter.h"
@@ -44,24 +43,10 @@ void DbiStreamBuilder::setFlags(uint16_t F) { Flags = F; }
void DbiStreamBuilder::setMachineType(PDB_Machine M) { MachineType = M; }
-Error DbiStreamBuilder::addDbgStream(pdb::DbgHeaderType Type,
- ArrayRef<uint8_t> Data) {
- if (DbgStreams[(int)Type].StreamNumber != kInvalidStreamIndex)
- return make_error<RawError>(raw_error_code::duplicate_entry,
- "The specified stream type already exists");
- auto ExpectedIndex = Msf.addStream(Data.size());
- if (!ExpectedIndex)
- return ExpectedIndex.takeError();
- uint32_t Index = std::move(*ExpectedIndex);
- DbgStreams[(int)Type].Data = Data;
- DbgStreams[(int)Type].StreamNumber = Index;
- return Error::success();
-}
-
uint32_t DbiStreamBuilder::calculateSerializedLength() const {
// For now we only support serializing the header.
return sizeof(DbiStreamHeader) + calculateFileInfoSubstreamSize() +
- calculateModiSubstreamSize() + DbgStreams.size() * sizeof(uint16_t);
+ calculateModiSubstreamSize();
}
Error DbiStreamBuilder::addModuleInfo(StringRef ObjFile, StringRef Module) {
@@ -231,7 +216,7 @@ Error DbiStreamBuilder::finalize() {
H->ECSubstreamSize = 0;
H->FileInfoSize = FileInfoBuffer.getLength();
H->ModiSubstreamSize = ModInfoBuffer.getLength();
- H->OptionalDbgHdrSize = DbgStreams.size() * sizeof(uint16_t);
+ H->OptionalDbgHdrSize = 0;
H->SecContrSubstreamSize = 0;
H->SectionMapSize = 0;
H->TypeServerSize = 0;
@@ -288,19 +273,6 @@ Error DbiStreamBuilder::commit(const msf::MSFLayout &Layout,
return EC;
if (auto EC = Writer.writeStreamRef(FileInfoBuffer))
return EC;
- for (auto &Stream : DbgStreams)
- if (auto EC = Writer.writeInteger(Stream.StreamNumber))
- return EC;
-
- for (auto &Stream : DbgStreams) {
- if (Stream.StreamNumber == kInvalidStreamIndex)
- continue;
- auto WritableStream = WritableMappedBlockStream::createIndexedStream(
- Layout, Buffer, Stream.StreamNumber);
- StreamWriter DbgStreamWriter(*WritableStream);
- if (auto EC = DbgStreamWriter.writeArray(Stream.Data))
- return EC;
- }
if (Writer.bytesRemaining() > 0)
return make_error<RawError>(raw_error_code::invalid_format,
OpenPOWER on IntegriCloud