Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions Sources/makeOptions/makeOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<llvm::StringRef>
getPrefixes(llvm::ArrayRef<llvm::StringLiteral> prefixes) {
return std::vector<llvm::StringRef>(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;
Expand Down