[Lldb-commits] [lldb] 88d9e43 - [lldb/Expression] Make Language() const, NFC

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


Author: Vedant Kumar
Date: 2020-05-04T14:02:43-07:00
New Revision: 88d9e4326f48041056c4db3506d30574c6e1d83c

URL: https://github.com/llvm/llvm-project/commit/88d9e4326f48041056c4db3506d30574c6e1d83c
DIFF: https://github.com/llvm/llvm-project/commit/88d9e4326f48041056c4db3506d30574c6e1d83c.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