Files
swift-mirror/test/Frontend/InternalChecks.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

18 lines
712 B
Swift

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -O -parse-stdlib -D INTERNAL_CHECKS_ENABLED -primary-file %s -emit-sil | %FileCheck %s --check-prefix=CHECKS
// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -O -parse-stdlib -primary-file %s -emit-sil | %FileCheck %s --check-prefix=NOCHECKS
import Swift
func test_internal_checks_config(_ x: Int, _ y: Int) -> Int {
#if INTERNAL_CHECKS_ENABLED
print("internal check emitted")
#endif
return x + y
}
// CHECKS-LABEL: _T014InternalChecks27test_internal_checks_configSiSi_SitF
// CHECKS: "internal check emitted"
// NOCHECKS-LABEL: _T014InternalChecks27test_internal_checks_configSiSi_SitF
// NOCHECKS-NOT: "internal check emitted"