[Lldb-commits] [lldb] r355375 - [Expression] Remove unused parameter from Evaluate

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 5 10:30:37 PST 2019


Eh, I take that back.  We switched to injecting #file and #line into the body text to do the same job, so this is indeed no longer needed.

Jim


> On Mar 5, 2019, at 10:21 AM, Jim Ingham via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> If you don't mind, I would like to revert this patch.  Though the parameter is currently unused on the llvm.org side, it is used in the Swift REPL, so removing it causes unnecessary conflicts.  Also, it will be necessary to support any kind of REPL - Sean gave a talk a couple of years ago at the llvm conference about doing a C++ REPL in lldb so this is not entirely speculative... So I'd like to keep it plumbed through.  I can't see that it does any harm.
> 
> Jim
> 
>> On Mar 4, 2019, at 7:33 PM, Alex Langford via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>> 
>> Author: xiaobai
>> Date: Mon Mar  4 19:33:34 2019
>> New Revision: 355375
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=355375&view=rev
>> Log:
>> [Expression] Remove unused parameter from Evaluate
>> 
>> Modified:
>>   lldb/trunk/include/lldb/Expression/UserExpression.h
>>   lldb/trunk/source/Expression/REPL.cpp
>>   lldb/trunk/source/Expression/UserExpression.cpp
>>   lldb/trunk/source/Target/Target.cpp
>> 
>> Modified: lldb/trunk/include/lldb/Expression/UserExpression.h
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/UserExpression.h?rev=355375&r1=355374&r2=355375&view=diff
>> ==============================================================================
>> --- lldb/trunk/include/lldb/Expression/UserExpression.h (original)
>> +++ lldb/trunk/include/lldb/Expression/UserExpression.h Mon Mar  4 19:33:34 2019
>> @@ -261,10 +261,6 @@ public:
>>  ///     Filled in with an error in case the expression evaluation
>>  ///     fails to parse, run, or evaluated.
>>  ///
>> -  /// @param[in] line_offset
>> -  ///     The offset of the first line of the expression from the "beginning" of
>> -  ///     a virtual source file used for error reporting and debug info.
>> -  ///
>>  /// @param[out] fixed_expression
>>  ///     If non-nullptr, the fixed expression is copied into the provided
>>  ///     string.
>> @@ -290,7 +286,7 @@ public:
>>  Evaluate(ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options,
>>           llvm::StringRef expr_cstr, llvm::StringRef expr_prefix,
>>           lldb::ValueObjectSP &result_valobj_sp, Status &error,
>> -           uint32_t line_offset = 0, std::string *fixed_expression = nullptr,
>> +           std::string *fixed_expression = nullptr,
>>           lldb::ModuleSP *jit_module_sp_ptr = nullptr,
>>           ValueObject *ctx_obj = nullptr);
>> 
>> 
>> Modified: lldb/trunk/source/Expression/REPL.cpp
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/REPL.cpp?rev=355375&r1=355374&r2=355375&view=diff
>> ==============================================================================
>> --- lldb/trunk/source/Expression/REPL.cpp (original)
>> +++ lldb/trunk/source/Expression/REPL.cpp Mon Mar  4 19:33:34 2019
>> @@ -307,7 +307,6 @@ void REPL::IOHandlerInputComplete(IOHand
>>      lldb::ExpressionResults execution_results =
>>          UserExpression::Evaluate(exe_ctx, expr_options, code.c_str(),
>>                                   expr_prefix, result_valobj_sp, error,
>> -                                   0,       // Line offset
>>                                   nullptr, // Fixed Expression
>>                                   &jit_module_sp);
>> 
>> 
>> Modified: lldb/trunk/source/Expression/UserExpression.cpp
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=355375&r1=355374&r2=355375&view=diff
>> ==============================================================================
>> --- lldb/trunk/source/Expression/UserExpression.cpp (original)
>> +++ lldb/trunk/source/Expression/UserExpression.cpp Mon Mar  4 19:33:34 2019
>> @@ -139,7 +139,7 @@ lldb::addr_t UserExpression::GetObjectPo
>> lldb::ExpressionResults UserExpression::Evaluate(
>>    ExecutionContext &exe_ctx, const EvaluateExpressionOptions &options,
>>    llvm::StringRef expr, llvm::StringRef prefix,
>> -    lldb::ValueObjectSP &result_valobj_sp, Status &error, uint32_t line_offset,
>> +    lldb::ValueObjectSP &result_valobj_sp, Status &error,
>>    std::string *fixed_expression, lldb::ModuleSP *jit_module_sp_ptr,
>>    ValueObject *ctx_obj) {
>>  Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
>> 
>> Modified: lldb/trunk/source/Target/Target.cpp
>> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=355375&r1=355374&r2=355375&view=diff
>> ==============================================================================
>> --- lldb/trunk/source/Target/Target.cpp (original)
>> +++ lldb/trunk/source/Target/Target.cpp Mon Mar  4 19:33:34 2019
>> @@ -2401,12 +2401,11 @@ ExpressionResults Target::EvaluateExpres
>>  } else {
>>    llvm::StringRef prefix = GetExpressionPrefixContents();
>>    Status error;
>> -    execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix,
>> -                                                 result_valobj_sp, error,
>> -                                                 0, // Line Number
>> -                                                 fixed_expression,
>> -                                                 nullptr, // Module
>> -                                                 ctx_obj);
>> +    execution_results =
>> +        UserExpression::Evaluate(exe_ctx, options, expr, prefix,
>> +                                 result_valobj_sp, error, fixed_expression,
>> +                                 nullptr, // Module
>> +                                 ctx_obj);
>>  }
>> 
>>  m_suppress_stop_hooks = old_suppress_value;
>> 
>> 
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list