File tree Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Expand file tree Collapse file tree 3 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ namespace swift {
2525
2626enum class BlockListAction : uint8_t {
2727 Undefined = 0 ,
28- ShouldUseBinaryModule ,
29- ShouldUseTextualModule,
28+ # define BLOCKLIST_ACTION ( NAME ) NAME ,
29+ # include " BlockListAction.def "
3030};
3131
3232enum class BlockListKeyKind : uint8_t {
Original file line number Diff line number Diff line change 1+ // ===--- BlockListAction.def - Define all blocklist actions -----*- C++ -*-===//
2+ //
3+ // This source file is part of the Swift.org open source project
4+ //
5+ // Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
6+ // Licensed under Apache License v2.0 with Runtime Library Exception
7+ //
8+ // See https://swift.org/LICENSE.txt for license information
9+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+ //
11+ // ===----------------------------------------------------------------------===//
12+ //
13+ // This definition file describes all block list actions for meta-programming
14+ // purposes.
15+ //
16+ // ===----------------------------------------------------------------------===//
17+
18+ #ifndef BLOCKLIST_ACTION
19+ #define BLOCKLIST_ACTION (NAME )
20+ #endif
21+
22+ BLOCKLIST_ACTION (ShouldUseBinaryModule)
23+ BLOCKLIST_ACTION(ShouldUseTextualModule)
24+
25+ #undef BLOCKLIST_ACTION
Original file line number Diff line number Diff line change @@ -115,10 +115,8 @@ void swift::BlockListStore::Implementation::addConfigureFilePath(StringRef path)
115115 for (auto &pair: *dyn_cast<yaml::MappingNode>(N)) {
116116 std::string key = getScalaString (pair.getKey ());
117117 auto action = llvm::StringSwitch<BlockListAction>(key)
118- #define CASE (X ) .Case(#X, BlockListAction::X)
119- CASE (ShouldUseBinaryModule)
120- CASE (ShouldUseTextualModule)
121- #undef CASE
118+ #define BLOCKLIST_ACTION (X ) .Case(#X, BlockListAction::X)
119+ #include " swift/Basic/BlockListAction.def"
122120 .Default (BlockListAction::Undefined);
123121 if (action == BlockListAction::Undefined)
124122 continue ;
You can’t perform that action at this time.
0 commit comments