summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-30 17:13:33 +0000
committerZachary Turner <zturner@google.com>2017-05-30 17:13:33 +0000
commit591312c5c1a133949285dde012d8cf373ab31b12 (patch)
tree018149cd6fdc99281c57823add5f228604dbaa93 /llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
parent5fd588be34ce1fe53e88590c8a8781ec973f45a0 (diff)
downloadbcm5719-llvm-591312c5c1a133949285dde012d8cf373ab31b12.tar.gz
bcm5719-llvm-591312c5c1a133949285dde012d8cf373ab31b12.zip
[CodeView] Add more DebugSubsection implementations.
This adds implementations for Symbols and FrameData, and renames the existing codeview::StringTable class to conform to the DebugSectionStringTable convention. llvm-svn: 304222
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp')
-rw-r--r--llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp b/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
index 9e19b4dab14..1a85a339f8c 100644
--- a/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
+++ b/llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp
@@ -10,7 +10,7 @@
#include "llvm/DebugInfo/CodeView/DebugChecksumsSubsection.h"
#include "llvm/DebugInfo/CodeView/CodeViewError.h"
-#include "llvm/DebugInfo/CodeView/StringTable.h"
+#include "llvm/DebugInfo/CodeView/DebugStringTableSubsection.h"
#include "llvm/Support/BinaryStreamReader.h"
using namespace llvm;
@@ -48,8 +48,13 @@ Error DebugChecksumsSubsectionRef::initialize(BinaryStreamReader Reader) {
return Error::success();
}
+Error DebugChecksumsSubsectionRef::initialize(BinaryStreamRef Section) {
+ BinaryStreamReader Reader(Section);
+ return initialize(Reader);
+}
-DebugChecksumsSubsection::DebugChecksumsSubsection(StringTable &Strings)
+DebugChecksumsSubsection::DebugChecksumsSubsection(
+ DebugStringTableSubsection &Strings)
: DebugSubsection(DebugSubsectionKind::FileChecksums), Strings(Strings) {}
void DebugChecksumsSubsection::addChecksum(StringRef FileName,
@@ -75,11 +80,11 @@ void DebugChecksumsSubsection::addChecksum(StringRef FileName,
SerializedSize += Len;
}
-uint32_t DebugChecksumsSubsection::calculateSerializedLength() {
+uint32_t DebugChecksumsSubsection::calculateSerializedSize() const {
return SerializedSize;
}
-Error DebugChecksumsSubsection::commit(BinaryStreamWriter &Writer) {
+Error DebugChecksumsSubsection::commit(BinaryStreamWriter &Writer) const {
for (const auto &FC : Checksums) {
FileChecksumEntryHeader Header;
Header.ChecksumKind = uint8_t(FC.Kind);
OpenPOWER on IntegriCloud