summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-06 10:32:39 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-06 10:32:39 +0000
commitc2e008734b02347c5fa3c888c5a23dda27433afb (patch)
tree3654dff6bb97da21cae3f63c475f50f9846e8ecd /llvm/include
parent03c0281a17ee5734cb0595aec403dbbf3de6a2f2 (diff)
downloadbcm5719-llvm-c2e008734b02347c5fa3c888c5a23dda27433afb.tar.gz
bcm5719-llvm-c2e008734b02347c5fa3c888c5a23dda27433afb.zip
Add LLVM-style RTTI to DIContext/DWARFContext classes
llvm-svn: 187790
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/DebugInfo/DIContext.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/DebugInfo/DIContext.h b/llvm/include/llvm/DebugInfo/DIContext.h
index bdd8dce08da..4bb7c774389 100644
--- a/llvm/include/llvm/DebugInfo/DIContext.h
+++ b/llvm/include/llvm/DebugInfo/DIContext.h
@@ -21,6 +21,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/RelocVisitor.h"
+#include "llvm/Support/Casting.h"
#include "llvm/Support/DataTypes.h"
namespace llvm {
@@ -122,6 +123,12 @@ typedef DenseMap<uint64_t, std::pair<uint8_t, int64_t> > RelocAddrMap;
class DIContext {
public:
+ enum DIContextKind {
+ CK_DWARF
+ };
+ DIContextKind getKind() const { return Kind; }
+
+ DIContext(DIContextKind K) : Kind(K) {}
virtual ~DIContext();
/// getDWARFContext - get a context for binary DWARF data.
@@ -135,6 +142,8 @@ public:
uint64_t Size, DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0;
virtual DIInliningInfo getInliningInfoForAddress(uint64_t Address,
DILineInfoSpecifier Specifier = DILineInfoSpecifier()) = 0;
+private:
+ const DIContextKind Kind;
};
}
OpenPOWER on IntegriCloud