aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
commita303c417bbdb53703c2c17398b08486bde78f1f6 (patch)
tree98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
parent12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff)
downloadsrc-a303c417bbdb53703c2c17398b08486bde78f1f6.tar.gz
src-a303c417bbdb53703c2c17398b08486bde78f1f6.zip
Vendor import of llvm trunk r301939:vendor/llvm/llvm-trunk-r301939
Notes
Notes: svn path=/vendor/llvm/dist/; revision=317683 svn path=/vendor/llvm/llvm-trunk-r301939/; revision=317684; tag=vendor/llvm/llvm-trunk-r301939
Diffstat (limited to 'include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h')
-rw-r--r--include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h66
1 files changed, 66 insertions, 0 deletions
diff --git a/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h b/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
new file mode 100644
index 000000000000..2c95690ed580
--- /dev/null
+++ b/include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
@@ -0,0 +1,66 @@
+//===- ModuleDebugStream.h - PDB Module Info Stream Access ----------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DEBUGINFO_PDB_RAW_MODULEDEBUGSTREAM_H
+#define LLVM_DEBUGINFO_PDB_RAW_MODULEDEBUGSTREAM_H
+
+#include "llvm/ADT/iterator_range.h"
+#include "llvm/DebugInfo/CodeView/CVRecord.h"
+#include "llvm/DebugInfo/CodeView/ModuleDebugFragmentRecord.h"
+#include "llvm/DebugInfo/CodeView/SymbolRecord.h"
+#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
+#include "llvm/Support/BinaryStreamArray.h"
+#include "llvm/Support/BinaryStreamRef.h"
+#include "llvm/Support/Error.h"
+
+namespace llvm {
+namespace pdb {
+class PDBFile;
+class DbiModuleDescriptor;
+
+class ModuleDebugStreamRef {
+ typedef codeview::ModuleDebugFragmentArray::Iterator
+ LinesAndChecksumsIterator;
+
+public:
+ ModuleDebugStreamRef(const DbiModuleDescriptor &Module,
+ std::unique_ptr<msf::MappedBlockStream> Stream);
+ ~ModuleDebugStreamRef();
+
+ Error reload();
+
+ uint32_t signature() const { return Signature; }
+
+ iterator_range<codeview::CVSymbolArray::Iterator>
+ symbols(bool *HadError) const;
+
+ llvm::iterator_range<LinesAndChecksumsIterator> linesAndChecksums() const;
+
+ bool hasLineInfo() const;
+
+ Error commit();
+
+private:
+ const DbiModuleDescriptor &Mod;
+
+ uint32_t Signature;
+
+ std::unique_ptr<msf::MappedBlockStream> Stream;
+
+ codeview::CVSymbolArray SymbolsSubstream;
+ BinaryStreamRef C11LinesSubstream;
+ BinaryStreamRef C13LinesSubstream;
+ BinaryStreamRef GlobalRefsSubstream;
+
+ codeview::ModuleDebugFragmentArray LinesAndChecksums;
+};
+}
+}
+
+#endif