Skip to content

Commit ceacb48

Browse files
committed
[lldb/Expression] Make Language() const, NFC
Allow Language() to be called from const methods within UserExpression. (cherry picked from commit 9e35498)
1 parent baefd3c commit ceacb48

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lldb/include/lldb/Expression/Expression.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ class Expression {
5151

5252
/// Return the language that should be used when parsing. To use the
5353
/// default, return eLanguageTypeUnknown.
54-
virtual lldb::LanguageType Language() { return lldb::eLanguageTypeUnknown; }
54+
virtual lldb::LanguageType Language() const {
55+
return lldb::eLanguageTypeUnknown;
56+
}
5557

5658
/// Return the Materializer that the parser should use when registering
5759
/// external values.

lldb/include/lldb/Expression/UserExpression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class UserExpression : public Expression {
194194

195195
/// Return the language that should be used when parsing. To use the
196196
/// default, return eLanguageTypeUnknown.
197-
lldb::LanguageType Language() override { return m_language; }
197+
lldb::LanguageType Language() const override { return m_language; }
198198

199199
/// Return the desired result type of the function, or eResultTypeAny if
200200
/// indifferent.

0 commit comments

Comments
 (0)