[Lldb-commits] [PATCH] D62755: [Target] Remove Process::GetCPPLanguageRuntime
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 3 16:56:39 PDT 2019
JDevlieghere added inline comments.
================
Comment at: include/lldb/Target/CPPLanguageRuntime.h:47
+ static CPPLanguageRuntime *GetCPPLanguageRuntime(Process &process) {
+ return static_cast<CPPLanguageRuntime *>(
+ process.GetLanguageRuntime(lldb::eLanguageTypeC_plus_plus));
----------------
xiaobai wrote:
> labath wrote:
> > It might be nice to add some glue so we could write `llvm::cast_or_null<CPPLanguageRuntime>(...)` here. The main advantage of that being that we'd automatically get an assert firing if `GetLanguageRuntime` ever returns something which is *not* a CPPLanguageRuntime.
> I had thought about doing that, but there's an assertion in GetLanguageRuntime that achieves the same thing imo. I do think that we could move towards a `llvm::cast_or_null` implementation though.
I think would be worthwhile too :-)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62755/new/
https://reviews.llvm.org/D62755
More information about the lldb-commits
mailing list