[Lldb-commits] [lldb] 0c1a3da - [LLDB] Remove the bool + RegisterInfo& version of GetRegisterInfo
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 28 05:30:43 PDT 2022
Author: David Spickett
Date: 2022-09-28T12:30:34Z
New Revision: 0c1a3da8ea1f0e024ebfd85c7532926f26c6bde5
URL: https://github.com/llvm/llvm-project/commit/0c1a3da8ea1f0e024ebfd85c7532926f26c6bde5
DIFF: https://github.com/llvm/llvm-project/commit/0c1a3da8ea1f0e024ebfd85c7532926f26c6bde5.diff
LOG: [LLDB] Remove the bool + RegisterInfo& version of GetRegisterInfo
All callers have been converted to the optional version.
Depends on D134540
Reviewed By: clayborg
Differential Revision: https://reviews.llvm.org/D134541
Added:
Modified:
lldb/include/lldb/Core/EmulateInstruction.h
lldb/source/Core/EmulateInstruction.cpp
lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h
lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/EmulateInstruction.h b/lldb/include/lldb/Core/EmulateInstruction.h
index fa049d4180fbf..dc15fe25cb3f2 100644
--- a/lldb/include/lldb/Core/EmulateInstruction.h
+++ b/lldb/include/lldb/Core/EmulateInstruction.h
@@ -375,9 +375,6 @@ class EmulateInstruction : public PluginInterface {
virtual bool TestEmulation(Stream *out_stream, ArchSpec &arch,
OptionValueDictionary *test_data) = 0;
- bool GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num,
- RegisterInfo ®_info);
-
virtual llvm::Optional<RegisterInfo>
GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) = 0;
diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp
index b175cfcc59af4..b497b0254a12f 100644
--- a/lldb/source/Core/EmulateInstruction.cpp
+++ b/lldb/source/Core/EmulateInstruction.cpp
@@ -582,12 +582,3 @@ bool EmulateInstruction::CreateFunctionEntryUnwind(UnwindPlan &unwind_plan) {
unwind_plan.Clear();
return false;
}
-
-bool EmulateInstruction::GetRegisterInfo(lldb::RegisterKind reg_kind,
- uint32_t reg_num,
- RegisterInfo ®_info) {
- llvm::Optional<RegisterInfo> info = GetRegisterInfo(reg_kind, reg_num);
- if (info)
- reg_info = *info;
- return info.has_value();
-}
\ No newline at end of file
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
index 9a51445f9c1a9..f5ad5cec26bb3 100644
--- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
+++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h
@@ -135,7 +135,6 @@ class EmulateInstructionARM : public EmulateInstruction {
bool TestEmulation(Stream *out_stream, ArchSpec &arch,
OptionValueDictionary *test_data) override;
- using EmulateInstruction::GetRegisterInfo;
llvm::Optional<RegisterInfo> GetRegisterInfo(lldb::RegisterKind reg_kind,
uint32_t reg_num) override;
diff --git a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
index 20b1c33c66cda..9a82d8409d05c 100644
--- a/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
+++ b/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h
@@ -65,8 +65,6 @@ class EmulateInstructionARM64 : public lldb_private::EmulateInstruction {
return false;
}
- using EmulateInstruction::GetRegisterInfo;
-
llvm::Optional<lldb_private::RegisterInfo>
GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) override;
diff --git a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
index e771bda2e1dea..af20f3e973faa 100644
--- a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
+++ b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h
@@ -80,8 +80,6 @@ class EmulateInstructionMIPS : public lldb_private::EmulateInstruction {
return false;
}
- using EmulateInstruction::GetRegisterInfo;
-
llvm::Optional<lldb_private::RegisterInfo>
GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) override;
diff --git a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
index 9c8a95a64f942..39b7670aa6750 100644
--- a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
+++ b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h
@@ -72,8 +72,6 @@ class EmulateInstructionMIPS64 : public lldb_private::EmulateInstruction {
return false;
}
- using EmulateInstruction::GetRegisterInfo;
-
llvm::Optional<lldb_private::RegisterInfo>
GetRegisterInfo(lldb::RegisterKind reg_kind, uint32_t reg_num) override;
diff --git a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h
index b0d9130bfb068..962a24a3a2eee 100644
--- a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h
+++ b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h
@@ -61,8 +61,6 @@ class EmulateInstructionPPC64 : public EmulateInstruction {
return false;
}
- using EmulateInstruction::GetRegisterInfo;
-
llvm::Optional<RegisterInfo> GetRegisterInfo(lldb::RegisterKind reg_kind,
uint32_t reg_num) override;
diff --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h
index 92f5c950c26ad..810d4b40bd056 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.h
@@ -76,8 +76,6 @@ class EmulateInstructionRISCV : public EmulateInstruction {
bool EvaluateInstruction(uint32_t options) override;
bool TestEmulation(Stream *out_stream, ArchSpec &arch,
OptionValueDictionary *test_data) override;
- using EmulateInstruction::GetRegisterInfo;
-
llvm::Optional<RegisterInfo> GetRegisterInfo(lldb::RegisterKind reg_kind,
uint32_t reg_num) override;
More information about the lldb-commits
mailing list