mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If given a SourceFile, only decls within that SourceFile will be serialized. Decls within other SourceFiles are emitted using cross-references that refer to the current module. Known issues: - External definitions won't be serialized by any source file. They probably have to be serialized into /all/ of them. - Nothing can actually /read/ a serialized partial-module yet. We need a notion of a TranslationUnit that can contain both source and serialized files, and we probably need loading to be more lazy. Swift SVN r9978
20 lines
779 B
Swift
20 lines
779 B
Swift
// RUN: rm -rf %t
|
|
// RUN: mkdir %t
|
|
// RUN: %swift -emit-module -module-name Multi -multi-file-output -parse-stdlib -o %t %s %S/Inputs/multi-file-2.swift
|
|
// RUN: llvm-bcanalyzer %t/multi-file.swiftmodule | FileCheck %s -check-prefix=THIS-FILE
|
|
// RUN: llvm-bcanalyzer %t/multi-file.swiftmodule | FileCheck %s -check-prefix=THIS-FILE-NEG
|
|
// RUN: llvm-bcanalyzer %t/multi-file-2.swiftmodule | FileCheck %s -check-prefix=OTHER-FILE
|
|
// RUN: llvm-bcanalyzer %t/multi-file-2.swiftmodule | FileCheck %s -check-prefix=OTHER-FILE-NEG
|
|
|
|
// Do not put any enums in this file. It's part of the test that no enums
|
|
// get serialized here.
|
|
|
|
class MyClass {
|
|
var value: TheEnum
|
|
}
|
|
|
|
// THIS-FILE: CLASS_DECL
|
|
// OTHER-FILE-NEG-NOT: CLASS_DECL
|
|
// OTHER-FILE: ENUM_DECL
|
|
// THIS-FILE-NEG-NOT: ENUM_DECL
|