[test] Disable bridging PCH in a few tests

The new driver builds a PCH by default, which the
old driver didn't do. These tests don't expect a
PCH, so avoid building it.
This commit is contained in:
Hamish Knight
2024-09-22 21:15:45 +01:00
parent b797a987a3
commit bbb04aaa20
6 changed files with 9 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
// REQUIRES: objc_interop
// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/tmp
// RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
// RUN: %target-swiftc_driver -emit-module -disable-bridging-pch -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h

View File

@@ -1,7 +1,7 @@
// REQUIRES: objc_interop
// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/tmp
// RUN: %target-swiftc_driver -emit-module -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
// RUN: %target-swiftc_driver -emit-module -disable-bridging-pch -import-objc-header %S/Inputs/app-bridging-header-to-pch.h -module-name App -emit-module-path %t/App.swiftmodule %S/Inputs/app-that-uses-pch-bridging-header.swift
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
// CHECK: IMPORTED_HEADER{{.*}}Inputs/app-bridging-header-to-pch.h

View File

@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -emit-module -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
// RUN: %target-build-swift -emit-module -disable-bridging-pch -import-objc-header %S/Inputs/pch-bridging-header-with-another-bridging-header/app.h -I %S/Inputs/pch-bridging-header-with-another-bridging-header -module-name App -emit-module-path %t/App.swiftmodule %S/../Inputs/empty.swift
// RUN: llvm-bcanalyzer -dump %t/App.swiftmodule | %FileCheck %s
// CHECK: IMPORTED_HEADER{{.*}}Inputs/pch-bridging-header-with-another-bridging-header/app.h
@@ -18,4 +18,4 @@
import App
_ = app_function(2)
_ = app_function(2)

View File

@@ -4,7 +4,7 @@
// RUN: %empty-directory(%t)
// RUN: cp %S/Inputs/serialized-objc-header.h %t
// RUN: %target-build-swift -emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module
// RUN: %target-build-swift -disable-bridging-pch -emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s
// RUN: rm %t/serialized-objc-header.h

View File

@@ -1,9 +1,9 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
// RUN: %target-build-swift -emit-module -emit-executable %s -g -I %S/Inputs/bridging-header-first/ -disable-bridging-pch -import-objc-header %S/Inputs/bridging-header-first/bridging.h -o %t/main -whole-module-optimization
// RUN: llvm-bcanalyzer -dump %t/main.swiftmodule | %FileCheck -check-prefix CHECK-DUMP %s
// REQUIRES: objc_interop

View File

@@ -1,5 +1,6 @@
// RUN: %empty-directory(%t)
// RUN: %target-build-swift %s -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
// FIXME: Crashes with PCH (https://github.com/swiftlang/swift/issues/76641)
// RUN: %target-build-swift %s -disable-bridging-pch -import-objc-header %S/Inputs/rdar29694978.h -emit-module -o %t/Library.swiftmodule
// RUN: %target-swift-ide-test -print-module -module-to-print=Library -source-filename=x -I %S/Inputs/ -I %t | %FileCheck %s
// REQUIRES: objc_interop