[Lldb-commits] [lldb] b3215c8 - [lldb] Rename SetResultIsInternal to SetSuppressPersistentResult (NFC)
Dave Lee via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 16 21:04:38 PST 2023
Author: Dave Lee
Date: 2023-02-16T21:04:23-08:00
New Revision: b3215c8106170e586c59cc66a118329108cb72a4
URL: https://github.com/llvm/llvm-project/commit/b3215c8106170e586c59cc66a118329108cb72a4
DIFF: https://github.com/llvm/llvm-project/commit/b3215c8106170e586c59cc66a118329108cb72a4.diff
LOG: [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
Added:
Modified:
lldb/include/lldb/Target/Target.h
lldb/source/API/SBExpressionOptions.cpp
lldb/source/Breakpoint/BreakpointLocation.cpp
lldb/source/Expression/UserExpression.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Target/Target.h b/lldb/include/lldb/Target/Target.h
index 09fbf45191d4..5c6e4fe5be9f 100644
--- a/lldb/include/lldb/Target/Target.h
+++ b/lldb/include/lldb/Target/Target.h
@@ -413,9 +413,11 @@ class EvaluateExpressionOptions {
uint32_t GetPoundLineLine() const { return m_pound_line_line; }
- void SetResultIsInternal(bool b) { m_result_is_internal = b; }
+ void SetSuppressPersistentResult(bool b) { m_suppress_persistent_result = b; }
- bool GetResultIsInternal() const { return m_result_is_internal; }
+ bool GetSuppressPersistentResult() const {
+ return m_suppress_persistent_result;
+ }
void SetAutoApplyFixIts(bool b) { m_auto_apply_fixits = b; }
@@ -446,7 +448,7 @@ class EvaluateExpressionOptions {
bool m_repl = false;
bool m_generate_debug_info = false;
bool m_ansi_color_errors = false;
- bool m_result_is_internal = false;
+ bool m_suppress_persistent_result = false;
bool m_auto_apply_fixits = true;
uint64_t m_retries_with_fixits = 1;
/// True if the executed code should be treated as utility code that is only
diff --git a/lldb/source/API/SBExpressionOptions.cpp b/lldb/source/API/SBExpressionOptions.cpp
index 6ae57f24606a..5f1d8d9ddba5 100644
--- a/lldb/source/API/SBExpressionOptions.cpp
+++ b/lldb/source/API/SBExpressionOptions.cpp
@@ -178,13 +178,13 @@ void SBExpressionOptions::SetGenerateDebugInfo(bool b) {
bool SBExpressionOptions::GetSuppressPersistentResult() {
LLDB_INSTRUMENT_VA(this);
- return m_opaque_up->GetResultIsInternal();
+ return m_opaque_up->GetSuppressPersistentResult();
}
void SBExpressionOptions::SetSuppressPersistentResult(bool b) {
LLDB_INSTRUMENT_VA(this, b);
- return m_opaque_up->SetResultIsInternal(b);
+ return m_opaque_up->SetSuppressPersistentResult(b);
}
const char *SBExpressionOptions::GetPrefix() const {
diff --git a/lldb/source/Breakpoint/BreakpointLocation.cpp b/lldb/source/Breakpoint/BreakpointLocation.cpp
index 0ee8bcf491ea..3ead1eca6913 100644
--- a/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -290,7 +290,7 @@ bool BreakpointLocation::ConditionSaysStop(ExecutionContext &exe_ctx,
options.SetUnwindOnError(true);
options.SetIgnoreBreakpoints(true);
options.SetTryAllThreads(true);
- options.SetResultIsInternal(
+ options.SetSuppressPersistentResult(
true); // Don't generate a user variable for condition expressions.
Status expr_error;
diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp
index c1515b0ace81..0c2d159d144a 100644
--- a/lldb/source/Expression/UserExpression.cpp
+++ b/lldb/source/Expression/UserExpression.cpp
@@ -424,7 +424,7 @@ UserExpression::Execute(DiagnosticManager &diagnostic_manager,
lldb::ExpressionResults expr_result = DoExecute(
diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);
Target *target = exe_ctx.GetTargetPtr();
- if (options.GetResultIsInternal() && result_var && target) {
+ if (options.GetSuppressPersistentResult() && result_var && target) {
if (auto *persistent_state =
target->GetPersistentExpressionStateForLanguage(m_language))
persistent_state->RemovePersistentVariable(result_var);
More information about the lldb-commits
mailing list