aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2025-01-22 23:19:47 -0800
committerGitHub <noreply@github.com>2025-01-22 23:19:47 -0800
commitcd5694ecea2da1990365f46f9737be1b29d94f0c (patch)
treefcd33bdddc82ec7dfd9b06b657dac86ac0267c6b /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent8eb99bbe6e8878bfd73fb301899ced6bb5dfff38 (diff)
downloadllvm-cd5694ecea2da1990365f46f9737be1b29d94f0c.zip
llvm-cd5694ecea2da1990365f46f9737be1b29d94f0c.tar.gz
llvm-cd5694ecea2da1990365f46f9737be1b29d94f0c.tar.bz2
[StrTable] Switch the option parser to `llvm::StringTable` (#123308)
Now that we have a dedicated abstraction for string tables, switch the option parser library's string table over to it rather than using a raw `const char*`. Also try to use the `StringTable::Offset` type rather than a raw `unsigned` where we can to avoid accidental increments or other issues. This is based on review feedback for the initial switch of options to a string table. Happy to tweak or adjust if desired here.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 93fed8e..99e0440 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -94,7 +94,8 @@ namespace {
class CommonOptTable : public opt::GenericOptTable {
public:
- CommonOptTable(const char *StrTable, ArrayRef<unsigned> PrefixesTable,
+ CommonOptTable(const StringTable &StrTable,
+ ArrayRef<StringTable::Offset> PrefixesTable,
ArrayRef<Info> OptionInfos, const char *Usage,
const char *Description)
: opt::GenericOptTable(StrTable, PrefixesTable, OptionInfos),