Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2aba496

Browse files
committed
Specify -swift-version whenever -emit-module-interface-path is specified.
With the fix for rdar://145168219, `swift-frontend` will start requiring that `-swift-version` (or `-language-mode`) is specified whenever emitting a `.swiftinterface` file. Add the necessary arguments in various tests.
1 parent 0735bb8 commit 2aba496

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lldb/packages/Python/lldbsuite/test/make/Swift.rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ ALL_SWIFT_SOURCES = $(SWIFT_SOURCES) $(DYLIB_SWIFT_SOURCES)
164164
SWIFT_OBJECTS = $(strip $(ALL_SWIFT_SOURCES:.swift=.swift.o))
165165

166166
ifeq "$(DISABLE_SWIFT_INTERFACE)" ""
167-
SWIFT_INTERFACE_FLAGS=-emit-module-interface-path $(BUILDDIR)/$(MODULENAME).swiftinterface
167+
SWIFT_INTERFACE_FLAGS=-swift-version 5 -emit-module-interface-path $(BUILDDIR)/$(MODULENAME).swiftinterface
168168
endif
169169

170170
ifeq "$(SWIFT_WMO)" "1"

lldb/test/Shell/SwiftREPL/SwiftInterface.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// RUN: rm -rf %t
55
// RUN: mkdir %t
66
// RUN: cp %S/Inputs/A.swift %t/AA.swift
7-
// RUN: %target-swiftc -module-name AA -emit-module-interface-path %t/AA.swiftinterface -emit-library -o %t/libAA%target-shared-library-suffix %t/AA.swift
7+
// RUN: %target-swiftc -swift-version 5 -module-name AA -emit-module-interface-path %t/AA.swiftinterface -emit-library -o %t/libAA%target-shared-library-suffix %t/AA.swift
88
// RUN: rm %t/AA.swift
99
// RUN: %lldb --repl="-I%t -L%t -lAA" < %s | FileCheck %s
1010

lldb/test/Shell/SwiftREPL/SwiftInterfaceForceModuleLoadMode.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// RUN: mkdir %t/mcp
1717
// RUN: mkdir %t/lib
1818
// RUN: cp %S/Inputs/A.swift %t/AA.swift
19-
// RUN: %target-swiftc -module-name AA -emit-module-interface-path %t/lib/AA.swiftinterface -emit-library -o %t/lib/libAA%target-shared-library-suffix %t/AA.swift
19+
// RUN: %target-swiftc -swift-version 5 -module-name AA -emit-module-interface-path %t/lib/AA.swiftinterface -emit-library -o %t/lib/libAA%target-shared-library-suffix %t/AA.swift
2020
// RUN: sed -e 's/FromInterface/FromSerialized/g' %t/AA.swift | %target-swiftc -module-name AA -emit-module -o %t/lib/AA.swiftmodule -
2121
// RUN: rm %t/AA.swift
2222

llvm/test/tools/dsymutil/ARM/swiftmodule.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# echo ''>I.swift
77
# echo ''>B.swift
88
# echo 'import I'>main.swift
9-
# xcrun swiftc -emit-module-interface-path I.swiftinterface -enable-library-evolution I.swift
10-
# xcrun swiftc -emit-module-path B.swiftmodule B.swift -Xfrontend -no-serialize-debugging-options
9+
# xcrun swiftc -swift-version 5 -emit-module-interface-path I.swiftinterface -enable-library-evolution I.swift
10+
# xcrun swiftc -swift-version 5 -emit-module-path B.swiftmodule B.swift -Xfrontend -no-serialize-debugging-options
1111
# xcrun swiftc -explicit-module-build main.swift -I. -module-cache-path cache -g -Xfrontend -no-serialize-debugging-options
1212
# output is "B.swiftmodule" and "cache/I*.swiftmodule"
1313
#

0 commit comments

Comments
 (0)