Files
swift-mirror/test/IRGen/single-module-num-threads.swift
Arnold Schwaighofer 821ba47079 IRGen: Add a frontend option to force single LLVM module emission in multithreaded mode
This allows to experiment with single module LLVM emission without
having to change drivers that expect multiple output files.

rdar://94744623
2022-06-10 09:46:07 -07:00

17 lines
678 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -module-name X -num-threads 1 -O -enable-single-module-llvm-emission -emit-ir %s %S/Inputs/single-module-num-threads-2.swift -o %t/single-module-num-threads.ll -o %t/single-module-num-threads-2.ll
// RUN: %FileCheck %s < %t/single-module-num-threads.ll
// RUN: %FileCheck %s --check-prefix=EMPTY < %t/single-module-num-threads-2.ll
// CHECK: define{{.*}} swiftcc void @"$s1X1AyyF"()
// CHECK: define{{.*}} swiftcc void @"$s1X1ByyF"()
// EMPTY-NOT: s1X1AyyF
// EMPTY-NOT: s1X1ByyF
// Make sure that with enable-single-module-llvm-emission we emit all code into
// one llvm module.
public func A() {
print("A")
}