[Lldb-commits] [PATCH] D62934: [LanguageRuntime] Introdce LLVM-style casts

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 7 09:33:50 PDT 2019


labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp:1128
 
-  RenderScriptRuntime *lang_rt =
-      (RenderScriptRuntime *)exe_ctx.GetProcessPtr()->GetLanguageRuntime(
-          eLanguageTypeExtRenderScript);
+  RenderScriptRuntime *lang_rt = llvm::cast_or_null<RenderScriptRuntime>(
+      exe_ctx.GetProcessPtr()->GetLanguageRuntime(
----------------
nit: the code (in this whole file) is clearly assuming the pointer is non-null, so you don't need the _or_null part. :)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62934/new/

https://reviews.llvm.org/D62934





More information about the lldb-commits mailing list