summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h40
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h55
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h50
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/IPDBSession.h3
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h2
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/PDBTypes.h2
-rw-r--r--llvm/include/llvm/module.modulemap2
8 files changed, 156 insertions, 0 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h
new file mode 100644
index 00000000000..5c37d9bc63c
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSectionContribs.h
@@ -0,0 +1,40 @@
+//==- DIAEnumSectionContribs.h --------------------------------- -*- C++ -*-==//
+//
+// 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_DIA_DIAENUMSECTIONCONTRIBS_H
+#define LLVM_DEBUGINFO_PDB_DIA_DIAENUMSECTIONCONTRIBS_H
+
+#include "DIASupport.h"
+#include "llvm/DebugInfo/PDB/IPDBEnumChildren.h"
+#include "llvm/DebugInfo/PDB/IPDBSectionContrib.h"
+
+namespace llvm {
+namespace pdb {
+class DIASession;
+
+class DIAEnumSectionContribs : public IPDBEnumChildren<IPDBSectionContrib> {
+public:
+ explicit DIAEnumSectionContribs(
+ const DIASession &PDBSession,
+ CComPtr<IDiaEnumSectionContribs> DiaEnumerator);
+
+ uint32_t getChildCount() const override;
+ ChildTypePtr getChildAtIndex(uint32_t Index) const override;
+ ChildTypePtr getNext() override;
+ void reset() override;
+ DIAEnumSectionContribs *clone() const override;
+
+private:
+ const DIASession &Session;
+ CComPtr<IDiaEnumSectionContribs> Enumerator;
+};
+}
+}
+
+#endif // LLVM_DEBUGINFO_PDB_DIA_DIAENUMSECTIONCONTRIBS_H
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h
new file mode 100644
index 00000000000..7bc28e30d70
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASectionContrib.h
@@ -0,0 +1,55 @@
+//===- DIASectionContrib.h - DIA Impl. of IPDBSectionContrib ------ C++ -*-===//
+//
+// 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_DIA_DIASECTIONCONTRIB_H
+#define LLVM_DEBUGINFO_PDB_DIA_DIASECTIONCONTRIB_H
+
+#include "DIASupport.h"
+#include "llvm/DebugInfo/PDB/IPDBSectionContrib.h"
+
+namespace llvm {
+namespace pdb {
+class DIASession;
+
+class DIASectionContrib : public IPDBSectionContrib {
+public:
+ explicit DIASectionContrib(const DIASession &PDBSession,
+ CComPtr<IDiaSectionContrib> DiaSection);
+
+ std::unique_ptr<PDBSymbolCompiland> getCompiland() const override;
+ uint32_t getAddressSection() const override;
+ uint32_t getAddressOffset() const override;
+ uint32_t getRelativeVirtualAddress() const override;
+ uint64_t getVirtualAddress() const override;
+ uint32_t getLength() const override;
+ bool isNotPaged() const override;
+ bool hasCode() const override;
+ bool hasCode16Bit() const override;
+ bool hasInitializedData() const override;
+ bool hasUninitializedData() const override;
+ bool isRemoved() const override;
+ bool hasComdat() const override;
+ bool isDiscardable() const override;
+ bool isNotCached() const override;
+ bool isShared() const override;
+ bool isExecutable() const override;
+ bool isReadable() const override;
+ bool isWritable() const override;
+ uint32_t getDataCrc32() const override;
+ uint32_t getRelocationsCrc32() const override;
+ uint32_t getCompilandId() const override;
+
+private:
+ const DIASession &Session;
+ CComPtr<IDiaSectionContrib> Section;
+};
+}
+}
+
+#endif // LLVM_DEBUGINFO_PDB_DIA_DIASECTIONCONTRIB_H
diff --git a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
index 8c9ec9f95f6..a6c0a2b1956 100644
--- a/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
+++ b/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h
@@ -71,6 +71,8 @@ public:
std::unique_ptr<IPDBEnumInjectedSources> getInjectedSources() const override;
+ std::unique_ptr<IPDBEnumSectionContribs> getSectionContribs() const override;
+
private:
CComPtr<IDiaSession> Session;
};
diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h
new file mode 100644
index 00000000000..4fda6240467
--- /dev/null
+++ b/llvm/include/llvm/DebugInfo/PDB/IPDBSectionContrib.h
@@ -0,0 +1,50 @@
+//==- IPDBSectionContrib.h - Interfaces for PDB SectionContribs --*- C++ -*-==//
+//
+// 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_IPDBSECTIONCONTRIB_H
+#define LLVM_DEBUGINFO_PDB_IPDBSECTIONCONTRIB_H
+
+#include "PDBTypes.h"
+
+namespace llvm {
+namespace pdb {
+
+/// IPDBSectionContrib defines an interface used to represent section
+/// contributions whose information are stored in the PDB.
+class IPDBSectionContrib {
+public:
+ virtual ~IPDBSectionContrib();
+
+ virtual std::unique_ptr<PDBSymbolCompiland> getCompiland() const = 0;
+ virtual uint32_t getAddressSection() const = 0;
+ virtual uint32_t getAddressOffset() const = 0;
+ virtual uint32_t getRelativeVirtualAddress() const = 0;
+ virtual uint64_t getVirtualAddress() const = 0;
+ virtual uint32_t getLength() const = 0;
+ virtual bool isNotPaged() const = 0;
+ virtual bool hasCode() const = 0;
+ virtual bool hasCode16Bit() const = 0;
+ virtual bool hasInitializedData() const = 0;
+ virtual bool hasUninitializedData() const = 0;
+ virtual bool isRemoved() const = 0;
+ virtual bool hasComdat() const = 0;
+ virtual bool isDiscardable() const = 0;
+ virtual bool isNotCached() const = 0;
+ virtual bool isShared() const = 0;
+ virtual bool isExecutable() const = 0;
+ virtual bool isReadable() const = 0;
+ virtual bool isWritable() const = 0;
+ virtual uint32_t getDataCrc32() const = 0;
+ virtual uint32_t getRelocationsCrc32() const = 0;
+ virtual uint32_t getCompilandId() const = 0;
+};
+}
+}
+
+#endif // LLVM_DEBUGINFO_PDB_IPDBSECTIONCONTRIB_H
diff --git a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h b/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
index 9af16da7077..01a017ebe98 100644
--- a/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
+++ b/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h
@@ -75,6 +75,9 @@ public:
virtual std::unique_ptr<IPDBEnumInjectedSources>
getInjectedSources() const = 0;
+
+ virtual std::unique_ptr<IPDBEnumSectionContribs>
+ getSectionContribs() const = 0;
};
}
}
diff --git a/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h b/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
index a8259697fb9..91ca05a1644 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Native/NativeSession.h
@@ -90,6 +90,8 @@ public:
std::unique_ptr<IPDBEnumInjectedSources> getInjectedSources() const override;
+ std::unique_ptr<IPDBEnumSectionContribs> getSectionContribs() const override;
+
PDBFile &getPDBFile() { return *Pdb; }
const PDBFile &getPDBFile() const { return *Pdb; }
diff --git a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
index 5ff0140f53b..bc6233ac790 100644
--- a/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
+++ b/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h
@@ -25,6 +25,7 @@ namespace pdb {
class IPDBDataStream;
class IPDBInjectedSource;
class IPDBLineNumber;
+class IPDBSectionContrib;
class IPDBSourceFile;
class IPDBTable;
class PDBSymDumper;
@@ -67,6 +68,7 @@ using IPDBEnumDataStreams = IPDBEnumChildren<IPDBDataStream>;
using IPDBEnumLineNumbers = IPDBEnumChildren<IPDBLineNumber>;
using IPDBEnumTables = IPDBEnumChildren<IPDBTable>;
using IPDBEnumInjectedSources = IPDBEnumChildren<IPDBInjectedSource>;
+using IPDBEnumSectionContribs = IPDBEnumChildren<IPDBSectionContrib>;
/// Specifies which PDB reader implementation is to be used. Only a value
/// of PDB_ReaderType::DIA is currently supported, but Native is in the works.
diff --git a/llvm/include/llvm/module.modulemap b/llvm/include/llvm/module.modulemap
index 4c977fef745..20c85167593 100644
--- a/llvm/include/llvm/module.modulemap
+++ b/llvm/include/llvm/module.modulemap
@@ -93,12 +93,14 @@ module LLVM_DebugInfo_PDB {
exclude header "DebugInfo/PDB/DIA/DIAEnumDebugStreams.h"
exclude header "DebugInfo/PDB/DIA/DIAEnumInjectedSources.h"
exclude header "DebugInfo/PDB/DIA/DIAEnumLineNumbers.h"
+ exclude header "DebugInfo/PDB/DIA/DIAEnumSectionContribs.h"
exclude header "DebugInfo/PDB/DIA/DIAEnumSourceFiles.h"
exclude header "DebugInfo/PDB/DIA/DIAEnumSymbols.h"
exclude header "DebugInfo/PDB/DIA/DIAEnumTables.h"
exclude header "DebugInfo/PDB/DIA/DIAInjectedSource.h"
exclude header "DebugInfo/PDB/DIA/DIALineNumber.h"
exclude header "DebugInfo/PDB/DIA/DIARawSymbol.h"
+ exclude header "DebugInfo/PDB/DIA/DIASectionContrib.h"
exclude header "DebugInfo/PDB/DIA/DIASession.h"
exclude header "DebugInfo/PDB/DIA/DIASourceFile.h"
exclude header "DebugInfo/PDB/DIA/DIASupport.h"
OpenPOWER on IntegriCloud