Skip to content

Commit b3215c8

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
1 parent 39811e2 commit b3215c8

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

lldb/include/lldb/Target/Target.h

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

414414
uint32_t GetPoundLineLine() const { return m_pound_line_line; }
415415

416-
void SetResultIsInternal(bool b) { m_result_is_internal = b; }
416+
void SetSuppressPersistentResult(bool b) { m_suppress_persistent_result = b; }
417417

418-
bool GetResultIsInternal() const { return m_result_is_internal; }
418+
bool GetSuppressPersistentResult() const {
419+
return m_suppress_persistent_result;
420+
}
419421

420422
void SetAutoApplyFixIts(bool b) { m_auto_apply_fixits = b; }
421423

@@ -446,7 +448,7 @@ class EvaluateExpressionOptions {
446448
bool m_repl = false;
447449
bool m_generate_debug_info = false;
448450
bool m_ansi_color_errors = false;
449-
bool m_result_is_internal = false;
451+
bool m_suppress_persistent_result = false;
450452
bool m_auto_apply_fixits = true;
451453
uint64_t m_retries_with_fixits = 1;
452454
/// 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
@@ -178,13 +178,13 @@ void SBExpressionOptions::SetGenerateDebugInfo(bool b) {
178178
bool SBExpressionOptions::GetSuppressPersistentResult() {
179179
LLDB_INSTRUMENT_VA(this);
180180

181-
return m_opaque_up->GetResultIsInternal();
181+
return m_opaque_up->GetSuppressPersistentResult();
182182
}
183183

184184
void SBExpressionOptions::SetSuppressPersistentResult(bool b) {
185185
LLDB_INSTRUMENT_VA(this, b);
186186

187-
return m_opaque_up->SetResultIsInternal(b);
187+
return m_opaque_up->SetSuppressPersistentResult(b);
188188
}
189189

190190
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
@@ -424,7 +424,7 @@ UserExpression::Execute(DiagnosticManager &diagnostic_manager,
424424
lldb::ExpressionResults expr_result = DoExecute(
425425
diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);
426426
Target *target = exe_ctx.GetTargetPtr();
427-
if (options.GetResultIsInternal() && result_var && target) {
427+
if (options.GetSuppressPersistentResult() && result_var && target) {
428428
if (auto *persistent_state =
429429
target->GetPersistentExpressionStateForLanguage(m_language))
430430
persistent_state->RemovePersistentVariable(result_var);

0 commit comments

Comments
 (0)