Skip to content

Commit 5e58d83

Browse files
committed
[lldb] Directly set memory_tagging in launch info flags
Directly set `memory_tagging` in launch info flags eliminating the need for a dedicated member in `CommandOptionsProcessLaunch`.
1 parent 5bcb5ba commit 5e58d83

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

lldb/source/Commands/CommandObjectProcess.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ class CommandObjectProcessLaunch : public CommandObjectProcessLaunchOrAttach {
181181
disable_aslr = target->GetDisableASLR();
182182
}
183183

184-
if (m_options.memory_tagging == eLazyBoolYes)
185-
m_options.launch_info.GetFlags().Set(eLaunchFlagMemoryTagging);
186-
187184
if (!m_class_options.GetName().empty()) {
188185
m_options.launch_info.SetProcessPluginName("ScriptedProcess");
189186
ScriptedMetadataSP metadata_sp = std::make_shared<ScriptedMetadata>(

lldb/source/Commands/CommandOptionsProcessLaunch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Status CommandOptionsProcessLaunch::SetOptionValue(
128128
}
129129

130130
case 'M':
131-
memory_tagging = true;
131+
launch_info.GetFlags().Set(eLaunchFlagMemoryTagging);
132132
break;
133133

134134
case 'c':

lldb/source/Commands/CommandOptionsProcessLaunch.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class CommandOptionsProcessLaunch : public lldb_private::OptionGroup {
3434
lldb_private::ExecutionContext *execution_context) override {
3535
launch_info.Clear();
3636
disable_aslr = lldb_private::eLazyBoolCalculate;
37-
memory_tagging = false;
3837
}
3938

4039
llvm::ArrayRef<lldb_private::OptionDefinition> GetDefinitions() override;
@@ -43,7 +42,6 @@ class CommandOptionsProcessLaunch : public lldb_private::OptionGroup {
4342

4443
lldb_private::ProcessLaunchInfo launch_info;
4544
lldb_private::LazyBool disable_aslr;
46-
bool memory_tagging;
4745
}; // CommandOptionsProcessLaunch
4846

4947
} // namespace lldb_private

0 commit comments

Comments
 (0)