jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

This seems fine.  The only things you should fix (see inline comments) are the 
name of GetDefaultExpressionLanguage and the comment on why the upgrading is 
necessary.  If you do those two things, then this can go in.  Sorry for the 
delay.


================
Comment at: include/lldb/Target/StackFrame.h:475-476
@@ +474,4 @@
+    //------------------------------------------------------------------
+    lldb::LanguageType
+    GetDefaultExpressionLanguage ();
+
----------------
This name seems confusing.  This is just the language of the current stack 
frame.  Deciding what language to use for the expression is just one possible 
use of this information.  It might also be useful to have the frame format 
print the language of the frame you've just stopped in.  So this should have a 
more generic name.  How about "GetLanguage".

================
Comment at: source/Expression/ClangExpressionParser.cpp:220-228
@@ +219,11 @@
+        //
+        // In http://reviews.llvm.org/D11482 Jim writes "Sean doesn't have a 
DESIRE to
+        // have the expression parser use ObjC++ anytime the language is a C 
family
+        // language. Rather he MUST right now, because the expression parser 
uses
+        // features of C++ to capture values. We could switch to using C++ in 
C/C++
+        // situations, and ObjC++ in others, but there wasn't sufficient 
motivation to
+        // add that. Sometime when we get some spare cycles we'll try to relax 
the need
+        // for C++, and then we'll truly be able to follow the frame language. 
For now,
+        // we do "Want C -> get ObjC++", "Want ObjC -> get ObjC++" etc... But 
again,
+        // that is not a fundamental choice, it is an implementation necessity.
+        m_compiler->getLangOpts().CPlusPlus = true;
----------------
The contents of this comment are fine, but just state the reason rather than 
describing how you found out about the reason...


http://reviews.llvm.org/D11102



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

Reply via email to