xiaobai added a comment.

In D64042#1574438 <https://reviews.llvm.org/D64042#1574438>, @jingham wrote:

> Why did you make this a function of Variable, rather than SymbolContextScope?


After thinking about it more, I realized that the implementation inside of 
SymbolContextScope would be identical or near identical to the implementation 
in SymbolContext. I thought that because `IsRuntimeSupportValue` requires that 
you have a Variable, that it would make sense to ask the Variable for its 
language. An alternative could be to ask the SymbolContext for its language 
instead, which I think will be effectively equivalent here.

I also noticed that there's a lot of repetitive code around asking for 
languages. Everybody always guesses from the mangled name and asks the 
compilation unit at some point during the process. Adding another 
implementation inside of SymbolContextScope would kind of add to the cruft a 
bit here I think.


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

https://reviews.llvm.org/D64042



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

Reply via email to