Files
swift-mirror/test/ParseableInterface/optimization-level.swift
Harlan Haskins 0999bfed74 Revert "Revert "[ParseableInterfaces] Stop explicitly optimizing cached modules""
This re-disables explicit optimization of cached modules.

rdar://46358840
2019-04-10 15:30:27 -07:00

17 lines
877 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/Lib.swiftinterface %s -O
// RUN: %target-swift-frontend -build-module-from-parseable-interface %t/Lib.swiftinterface -Xllvm -sil-print-pass-name -o /dev/null 2>&1 | %FileCheck --check-prefix OPT %s
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t/Lib.swiftinterface %s -Onone
// RUN: %target-swift-frontend -build-module-from-parseable-interface %t/Lib.swiftinterface -Xllvm -sil-print-pass-name -o /dev/null 2>&1 | %FileCheck --check-prefix UNOPT %s
// This is a bit of an implementation detail, but we want to make sure
// optimization passes don't run when compiling a .swiftinterface that was
// generated with -Onone.
// OPT: EagerSpecializer
// UNOPT-NOT: EagerSpecializer
public func f() {}