[llvm] r285487 - Define calculateDbgStreamSize for consistency.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 17:56:44 PDT 2016
Author: ruiu
Date: Fri Oct 28 19:56:44 2016
New Revision: 285487
URL: http://llvm.org/viewvc/llvm-project?rev=285487&view=rev
Log:
Define calculateDbgStreamSize for consistency.
Modified:
llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h
llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h?rev=285487&r1=285486&r2=285487&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/PDB/Raw/DbiStreamBuilder.h Fri Oct 28 19:56:44 2016
@@ -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();
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp?rev=285487&r1=285486&r2=285487&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp Fri Oct 28 19:56:44 2016
@@ -61,7 +61,7 @@ Error DbiStreamBuilder::addDbgStream(pdb
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::calculateName
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);
More information about the llvm-commits
mailing list