[Lldb-commits] [lldb] 9e35498 - [lldb/Expression] Make Language() const, NFC

Vedant Kumar via lldb-commits lldb-commits at lists.llvm.org
Mon May 4 14:42:17 PDT 2020


Author: Vedant Kumar
Date: 2020-05-04T14:42:01-07:00
New Revision: 9e3549804672c79d64eececab39019f4dfd2b7ea

URL: https://github.com/llvm/llvm-project/commit/9e3549804672c79d64eececab39019f4dfd2b7ea
DIFF: https://github.com/llvm/llvm-project/commit/9e3549804672c79d64eececab39019f4dfd2b7ea.diff

LOG: [lldb/Expression] Make Language() const, NFC

Allow Language() to be called from const methods within UserExpression.

Added: 
    

Modified: 
    lldb/include/lldb/Expression/Expression.h
    lldb/include/lldb/Expression/UserExpression.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Expression/Expression.h b/lldb/include/lldb/Expression/Expression.h
index 1e4453de04ff..aaac889e6ed2 100644
--- a/lldb/include/lldb/Expression/Expression.h
+++ b/lldb/include/lldb/Expression/Expression.h
@@ -51,7 +51,9 @@ class Expression {
 
   /// Return the language that should be used when parsing.  To use the
   /// default, return eLanguageTypeUnknown.
-  virtual lldb::LanguageType Language() { return lldb::eLanguageTypeUnknown; }
+  virtual lldb::LanguageType Language() const {
+    return lldb::eLanguageTypeUnknown;
+  }
 
   /// Return the Materializer that the parser should use when registering
   /// external values.

diff  --git a/lldb/include/lldb/Expression/UserExpression.h b/lldb/include/lldb/Expression/UserExpression.h
index 8f3a505addea..8236c417f73a 100644
--- a/lldb/include/lldb/Expression/UserExpression.h
+++ b/lldb/include/lldb/Expression/UserExpression.h
@@ -194,7 +194,7 @@ class UserExpression : public Expression {
 
   /// Return the language that should be used when parsing.  To use the
   /// default, return eLanguageTypeUnknown.
-  lldb::LanguageType Language() override { return m_language; }
+  lldb::LanguageType Language() const override { return m_language; }
 
   /// Return the desired result type of the function, or eResultTypeAny if
   /// in
diff erent.


        


More information about the lldb-commits mailing list