Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift-ci
2018-11-27 23:30:31 -08:00
3 changed files with 15 additions and 0 deletions

View File

@@ -344,10 +344,12 @@ static bool buildSwiftModuleFromSwiftInterface(
} }
LLVM_DEBUG(llvm::dbgs() << "Serializing " << OutPath << "\n"); LLVM_DEBUG(llvm::dbgs() << "Serializing " << OutPath << "\n");
FrontendOptions &FEOpts = SubInvocation.getFrontendOptions();
SerializationOptions SerializationOpts; SerializationOptions SerializationOpts;
std::string OutPathStr = OutPath; std::string OutPathStr = OutPath;
SerializationOpts.OutputPath = OutPathStr.c_str(); SerializationOpts.OutputPath = OutPathStr.c_str();
SerializationOpts.SerializeAllSIL = true; SerializationOpts.SerializeAllSIL = true;
SerializationOpts.ModuleLinkName = FEOpts.ModuleLinkName;
SmallVector<FileDependency, 16> Deps; SmallVector<FileDependency, 16> Deps;
if (collectDepsForSerialization(FS, SubInstance, InPath, ModuleCachePath, if (collectDepsForSerialization(FS, SubInstance, InPath, ModuleCachePath,
Deps, Diags, OuterTracker)) { Deps, Diags, OuterTracker)) {

View File

@@ -0,0 +1,3 @@
public struct TestStruct {
public init() {}
}

View File

@@ -0,0 +1,10 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -emit-library -module-name TestModule -module-link-name coreTestModuleKitUtilsTool %S/Inputs/TestModule.swift -emit-parseable-module-interface -o %t/libcoreTestModuleKitUtilsTool.%target-dylib-extension
// RUN: %target-swift-frontend -emit-ir -I %t -L %t -enable-parseable-module-interface %s | %FileCheck %s
import TestModule
_ = TestStruct()
// CHECK: -lcoreTestModuleKitUtilsTool