Skip to content

Commit 54fd14d

Browse files
committed
[lldb] Rename SetResultIsInternal to SetSuppressPersistentResult (NFC)
Rename `SetResultIsInternal` and `GetResultIsInternal` to `SetSuppressPersistentResult` and `GetSuppressPersistentResult` respectively. Also rename `m_result_is_internal`. This matches the naming in the SB API. A separate change calls `SetSuppressPersistentResult`, where the name `SetResultIsInternal` doesn't quite fit. Differential Revision: https://reviews.llvm.org/D144042 (cherry picked from commit b3215c8)
1 parent 515b592 commit 54fd14d

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

lldb/include/lldb/Target/Target.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -478,9 +478,11 @@ class EvaluateExpressionOptions {
478478

479479
uint32_t GetExpressionNumber() const;
480480

481-
void SetResultIsInternal(bool b) { m_result_is_internal = b; }
481+
void SetSuppressPersistentResult(bool b) { m_suppress_persistent_result = b; }
482482

483-
bool GetResultIsInternal() const { return m_result_is_internal; }
483+
bool GetSuppressPersistentResult() const {
484+
return m_suppress_persistent_result;
485+
}
484486

485487
void SetAutoApplyFixIts(bool b) { m_auto_apply_fixits = b; }
486488

@@ -517,7 +519,7 @@ class EvaluateExpressionOptions {
517519
bool m_playground_transforms_hp = true;
518520
bool m_generate_debug_info = false;
519521
bool m_ansi_color_errors = false;
520-
bool m_result_is_internal = false;
522+
bool m_suppress_persistent_result = false;
521523
bool m_auto_apply_fixits = true;
522524
uint64_t m_retries_with_fixits = 1;
523525
/// True if the executed code should be treated as utility code that is only

lldb/source/API/SBExpressionOptions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,13 @@ void SBExpressionOptions::SetGenerateDebugInfo(bool b) {
212212
bool SBExpressionOptions::GetSuppressPersistentResult() {
213213
LLDB_INSTRUMENT_VA(this);
214214

215-
return m_opaque_up->GetResultIsInternal();
215+
return m_opaque_up->GetSuppressPersistentResult();
216216
}
217217

218218
void SBExpressionOptions::SetSuppressPersistentResult(bool b) {
219219
LLDB_INSTRUMENT_VA(this, b);
220220

221-
return m_opaque_up->SetResultIsInternal(b);
221+
return m_opaque_up->SetSuppressPersistentResult(b);
222222
}
223223

224224
const char *SBExpressionOptions::GetPrefix() const {

lldb/source/Breakpoint/BreakpointLocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx,
290290
options.SetUnwindOnError(true);
291291
options.SetIgnoreBreakpoints(true);
292292
options.SetTryAllThreads(true);
293-
options.SetResultIsInternal(
293+
options.SetSuppressPersistentResult(
294294
true); // Don't generate a user variable for condition expressions.
295295

296296
Status expr_error;

lldb/source/Expression/UserExpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ UserExpression::Execute(DiagnosticManager &diagnostic_manager,
435435
lldb::ExpressionResults expr_result = DoExecute(
436436
diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);
437437
Target *target = exe_ctx.GetTargetPtr();
438-
if (options.GetResultIsInternal() && result_var && target) {
438+
if (options.GetSuppressPersistentResult() && result_var && target) {
439439
#ifdef LLDB_ENABLE_SWIFT
440440
if (m_language == lldb::eLanguageTypeSwift) {
441441
if (auto *exe_scope = exe_ctx.GetBestExecutionContextScope())

lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ SwiftLanguageRuntimeImpl::RunObjectDescriptionExpr(ValueObject &object,
10241024
ValueObjectSP result_sp;
10251025
EvaluateExpressionOptions eval_options;
10261026
eval_options.SetLanguage(lldb::eLanguageTypeSwift);
1027-
eval_options.SetResultIsInternal(true);
1027+
eval_options.SetSuppressPersistentResult(true);
10281028
eval_options.SetGenerateDebugInfo(true);
10291029
eval_options.SetTimeout(m_process.GetUtilityExpressionTimeout());
10301030

@@ -2146,7 +2146,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
21462146

21472147
EvaluateExpressionOptions eval_options;
21482148
eval_options.SetLanguage(lldb::eLanguageTypeSwift);
2149-
eval_options.SetResultIsInternal(true);
2149+
eval_options.SetSuppressPersistentResult(true);
21502150
ValueObjectSP result_valobj_sp;
21512151
std::string Expr =
21522152
(llvm::Twine("Swift._get") + Kind + llvm::Twine("RetainCount(") +
@@ -2171,7 +2171,7 @@ class CommandObjectSwift_RefCount : public CommandObjectRaw {
21712171
StackFrameSP frame_sp(m_exe_ctx.GetFrameSP());
21722172
EvaluateExpressionOptions options;
21732173
options.SetLanguage(lldb::eLanguageTypeSwift);
2174-
options.SetResultIsInternal(true);
2174+
options.SetSuppressPersistentResult(true);
21752175
ValueObjectSP result_valobj_sp;
21762176

21772177
// We want to evaluate first the object we're trying to get the

0 commit comments

Comments
 (0)