forked from OSchip/llvm-project
Define calculateDbgStreamSize for consistency.
llvm-svn: 285487
This commit is contained in:
parent
1bab9cfbe5
commit
77be2403f6
|
@ -70,6 +70,7 @@ private:
|
|||
uint32_t calculateModiSubstreamSize() const;
|
||||
uint32_t calculateFileInfoSubstreamSize() const;
|
||||
uint32_t calculateNamesBufferSize() const;
|
||||
uint32_t calculateDbgStreamsSize() const;
|
||||
|
||||
Error generateModiSubstream();
|
||||
Error generateFileInfoSubstream();
|
||||
|
|
|
@ -61,7 +61,7 @@ Error DbiStreamBuilder::addDbgStream(pdb::DbgHeaderType Type,
|
|||
uint32_t DbiStreamBuilder::calculateSerializedLength() const {
|
||||
// For now we only support serializing the header.
|
||||
return sizeof(DbiStreamHeader) + calculateFileInfoSubstreamSize() +
|
||||
calculateModiSubstreamSize() + DbgStreams.size() * sizeof(uint16_t);
|
||||
calculateModiSubstreamSize() + calculateDbgStreamsSize();
|
||||
}
|
||||
|
||||
Error DbiStreamBuilder::addModuleInfo(StringRef ObjFile, StringRef Module) {
|
||||
|
@ -121,6 +121,10 @@ uint32_t DbiStreamBuilder::calculateNamesBufferSize() const {
|
|||
return Size;
|
||||
}
|
||||
|
||||
uint32_t DbiStreamBuilder::calculateDbgStreamsSize() const {
|
||||
return DbgStreams.size() * sizeof(uint16_t);
|
||||
}
|
||||
|
||||
Error DbiStreamBuilder::generateModiSubstream() {
|
||||
uint32_t Size = calculateModiSubstreamSize();
|
||||
auto Data = Allocator.Allocate<uint8_t>(Size);
|
||||
|
|
Loading…
Reference in New Issue