From c2b8484f401aea78b8eebde9e47e2b1deb05c2b6 Mon Sep 17 00:00:00 2001 From: Anthony Latsis Date: Fri, 3 Oct 2025 13:27:15 +0100 Subject: [PATCH] makeOptions: Remove workaround to support LLVM 17 Follow-up to https://github.com/swiftlang/swift-driver/pull/1975. --- Sources/makeOptions/makeOptions.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/Sources/makeOptions/makeOptions.cpp b/Sources/makeOptions/makeOptions.cpp index 3fe7dc5db..411e5650d 100644 --- a/Sources/makeOptions/makeOptions.cpp +++ b/Sources/makeOptions/makeOptions.cpp @@ -75,8 +75,6 @@ struct RawOption { bool isHidden() const { return flags & llvm::opt::HelpHidden; } }; -#if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 21 - #define OPTTABLE_PREFIXES_TABLE_CODE #include "swift/Option/Options.inc" #undef OPTTABLE_PREFIXES_TABLE_CODE @@ -102,23 +100,6 @@ static const char *getPrefixedName(unsigned prefixedNameOffset) { return OptionStrTable[prefixedNameOffset].data(); } -#else // #if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 21 - -#define PREFIX(NAME, VALUE) static constexpr llvm::StringLiteral NAME[] = VALUE; -#include "swift/Option/Options.inc" -#undef PREFIX - -static std::vector -getPrefixes(llvm::ArrayRef prefixes) { - return std::vector(prefixes.begin(), prefixes.end()); -} - -static const char *getPrefixedName(const char *prefixedName) { - return prefixedName; -} - -#endif // #if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 21 - namespace { using namespace swift::options; using namespace llvm::opt;