Files
swift-mirror/test/IRGen/disable-llvm-optzns.swift
Erik Eckstein b5de7e4e49 IRGen: fix -disable-llvm-optzns
If LLVM optimizations are to be disabled, we cannot just not run all LLVM passes, because there are some mandatory LLVM passes, like coro splitting.
Instead, just run the -O0 LLVM pipeline if -disable-llvm-optzns is used.

Fixes compiler crashes if -disable-llvm-optzns is used.

Note: if one wants to see the output of IRGen, -emit-irgen can be used.
2023-09-25 09:20:04 +02:00

10 lines
245 B
Swift

// RUN: %target-swift-frontend -primary-file %s -disable-availability-checking -c -o /dev/null -O -disable-llvm-optzns
// REQUIRES: concurrency
// Check that -disable-llvm-optzns does not crash the compiler
func testit() async {
print(1)
}