Author: Alex Langford Date: 2024-05-06T10:11:03-07:00 New Revision: cf6d79711d8a423cade5a555db650cb46a74e565
URL: https://github.com/llvm/llvm-project/commit/cf6d79711d8a423cade5a555db650cb46a74e565 DIFF: https://github.com/llvm/llvm-project/commit/cf6d79711d8a423cade5a555db650cb46a74e565.diff LOG: [lldb][NFCI] Remove unused DWARF value-to-name functions (#91010) I was cleaning up this portion of the code and realized these are completely unused. Added: Modified: lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h Removed: ################################################################################ diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp index 1f0e10ef27018b..2fb0c224bf8e84 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp @@ -23,26 +23,6 @@ llvm::StringRef DW_TAG_value_to_name(dw_tag_t tag) { return s_unknown_tag_name; } -const char *DW_AT_value_to_name(uint32_t val) { - static char invalid[100]; - llvm::StringRef llvmstr = llvm::dwarf::AttributeString(val); - if (llvmstr.empty()) { - snprintf(invalid, sizeof(invalid), "Unknown DW_AT constant: 0x%x", val); - return invalid; - } - return llvmstr.data(); -} - -const char *DW_FORM_value_to_name(uint32_t val) { - static char invalid[100]; - llvm::StringRef llvmstr = llvm::dwarf::FormEncodingString(val); - if (llvmstr.empty()) { - snprintf(invalid, sizeof(invalid), "Unknown DW_FORM constant: 0x%x", val); - return invalid; - } - return llvmstr.data(); -} - const char *DW_OP_value_to_name(uint32_t val) { static char invalid[100]; llvm::StringRef llvmstr = llvm::dwarf::OperationEncodingString(val); @@ -53,35 +33,5 @@ const char *DW_OP_value_to_name(uint32_t val) { return llvmstr.data(); } -const char *DW_ATE_value_to_name(uint32_t val) { - static char invalid[100]; - llvm::StringRef llvmstr = llvm::dwarf::AttributeEncodingString(val); - if (llvmstr.empty()) { - snprintf(invalid, sizeof(invalid), "Unknown DW_ATE constant: 0x%x", val); - return invalid; - } - return llvmstr.data(); -} - -const char *DW_LANG_value_to_name(uint32_t val) { - static char invalid[100]; - llvm::StringRef llvmstr = llvm::dwarf::LanguageString(val); - if (llvmstr.empty()) { - snprintf(invalid, sizeof(invalid), "Unknown DW_LANG constant: 0x%x", val); - return invalid; - } - return llvmstr.data(); -} - -const char *DW_LNS_value_to_name(uint32_t val) { - static char invalid[100]; - llvm::StringRef llvmstr = llvm::dwarf::LNStandardString(val); - if (llvmstr.empty()) { - snprintf(invalid, sizeof(invalid), "Unknown DW_LNS constant: 0x%x", val); - return invalid; - } - return llvmstr.data(); -} - } // namespace dwarf } // namespace lldb_private::plugin diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h index e87ac458fe962c..be81cb0f5df1ea 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h @@ -15,22 +15,10 @@ namespace lldb_private::plugin { namespace dwarf { -typedef uint32_t DRC_class; // Holds DRC_* class bitfields - llvm::StringRef DW_TAG_value_to_name(dw_tag_t tag); -const char *DW_AT_value_to_name(uint32_t val); - -const char *DW_FORM_value_to_name(uint32_t val); - const char *DW_OP_value_to_name(uint32_t val); -const char *DW_ATE_value_to_name(uint32_t val); - -const char *DW_LANG_value_to_name(uint32_t val); - -const char *DW_LNS_value_to_name(uint32_t val); - } // namespace dwarf } // namespace lldb_private::plugin _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits