summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
diff options
context:
space:
mode:
authorAlex Langford <apl@fb.com>2019-06-08 18:45:00 +0000
committerAlex Langford <apl@fb.com>2019-06-08 18:45:00 +0000
commit056f6f1856513209b46f68ca119e6fcf09aae604 (patch)
tree2432d841afeff8e8f7f84e9516b827cf768c28c6 /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
parent6ddd7aa4c3015e45b6624eb1f1e166a4fcf9cec7 (diff)
[LanguageRuntime] Introduce LLVM-style casts
Summary: Using llvm-style rtti gives us stronger guarantees around casting LanguageRuntimes. As discussed in D62755 Differential Revision: https://reviews.llvm.org/D62934 llvm-svn: 362884
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h')
-rw-r--r--lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index c3114b987a42..257e6d46f3f5 100644
--- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -314,6 +314,16 @@ public:
static lldb_private::ConstString GetPluginNameStatic();
+ static char ID;
+
+ bool isA(const void *ClassID) const override {
+ return ClassID == &ID || CPPLanguageRuntime::isA(ClassID);
+ }
+
+ static bool classof(const LanguageRuntime *runtime) {
+ return runtime->isA(&ID);
+ }
+
static bool IsRenderScriptModule(const lldb::ModuleSP &module_sp);
static ModuleKind GetModuleKind(const lldb::ModuleSP &module_sp);