labath accepted this revision.
labath 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));
----------------
JDevlieghere wrote:
> xiaobai wrote:
> > JDevlieghere wrote:
> > > 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 :-) 
> > Would y'all mind if I did that in a follow up commit? I think it is 
> > worthwhile/valuable, but I'd like it to be in a separate commit if possible.
> Sounds good
no problem here.


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

https://reviews.llvm.org/D62755



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to