From 749d35c593eb3238c5dcb7284f1e3aee60d57b9e Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 6 Aug 2013 10:32:39 +0000 Subject: Add LLVM-style RTTI to DIContext/DWARFContext classes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187790 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/DebugInfo/DIContext.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/llvm/DebugInfo') diff --git a/include/llvm/DebugInfo/DIContext.h b/include/llvm/DebugInfo/DIContext.h index bdd8dce08d..4bb7c77438 100644 --- a/include/llvm/DebugInfo/DIContext.h +++ b/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 > 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; }; } -- cgit v1.2.3