Skip to content

Commit aa0f5d5

Browse files
authored
[swift-ide-test] support multiple '-define-availability' (#41285)
rdar://88596547
1 parent 7179a8d commit aa0f5d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ AllowCompilerErrors("allow-compiler-errors",
814814
llvm::cl::desc("Whether to attempt to continue despite compiler errors"),
815815
llvm::cl::init(false));
816816

817-
static llvm::cl::opt<std::string>
817+
static llvm::cl::list<std::string>
818818
DefineAvailability("define-availability",
819819
llvm::cl::desc("Define a macro for @available"),
820820
llvm::cl::cat(Category));
@@ -4238,8 +4238,8 @@ int main(int argc, char *argv[]) {
42384238

42394239
InitInvok.setSDKPath(options::SDK);
42404240

4241-
if (!options::DefineAvailability.empty()) {
4242-
InitInvok.getLangOptions().AvailabilityMacros.push_back(options::DefineAvailability);
4241+
for (auto macro : options::DefineAvailability) {
4242+
InitInvok.getLangOptions().AvailabilityMacros.push_back(macro);
42434243
}
42444244
for (auto map: options::SerializedPathObfuscate) {
42454245
auto SplitMap = StringRef(map).split('=');

0 commit comments

Comments
 (0)