mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Explicitly disable batch mode in createCompilerInvocation, since it uses -force-single-frontend-invocation. Previously we were getting spurious warnings. Also add a test that -disable-batch-mode will allow commands that use -index-file to avoid the same warning, since that is likely what they want to do as well. rdar://39581506
10 lines
961 B
Swift
10 lines
961 B
Swift
// RUN: %swift-ide-test_plain -test-createCompilerInvocation %s 2>&1
|
|
// RUN: %swift-ide-test_plain -test-createCompilerInvocation -emit-executable %s %S/Input/main.swift %S/Input/lib.swift -module-name createCompilerInvocation -emit-module -emit-objc-header -o %t.out 2>&1
|
|
// RUN: %swift-ide-test_plain -test-createCompilerInvocation -c %s %S/Input/main.swift %S/Input/lib.swift -module-name createCompilerInvocation -emit-module -emit-objc-header 2>&1
|
|
// RUN: not %swift-ide-test_plain -test-createCompilerInvocation -typecheck %s -emit-module-path %t.swiftmodule 2>&1 | %FileCheck --check-prefix=CHECK-FAIL %s
|
|
// RUN: not %swift-ide-test_plain -test-createCompilerInvocation -v 2>&1 | %FileCheck --check-prefix=CHECK-FAIL %s
|
|
// RUN: %swift-ide-test_plain -test-createCompilerInvocation %s -enable-batch-mode 2>&1 | %FileCheck -allow-empty -check-prefix=CHECK-NOWARN %s
|
|
|
|
// CHECK-FAIL: error: unable to create a CompilerInvocation
|
|
// CHECK-NOWARN-NOT: warning
|