Add LLVM-style RTTI to DIContext/DWARFContext classes
llvm-svn: 187790
diff --git a/llvm/lib/DebugInfo/DWARFContext.h b/llvm/lib/DebugInfo/DWARFContext.h
index 058476e..5d8f714 100644
--- a/llvm/lib/DebugInfo/DWARFContext.h
+++ b/llvm/lib/DebugInfo/DWARFContext.h
@@ -48,7 +48,12 @@
void parseDWOCompileUnits();
public:
- DWARFContext() {}
+ DWARFContext() : DIContext(CK_DWARF) {}
+
+ static bool classof(const DIContext *DICtx) {
+ return DICtx->getKind() == CK_DWARF;
+ }
+
virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All);
/// Get the number of compile units in this context.