Files
swift-mirror/test/IRGen/clang_inline_opt.swift
John McCall c893e955aa Propagate "-O" to Clang (as "-Os").
It affects Clang IRGen, among other things.
2017-07-26 00:32:08 -04:00

15 lines
435 B
Swift

// RUN: %target-swift-frontend -import-objc-header %S/Inputs/c_functions.h -primary-file %s -O -emit-ir -disable-llvm-optzns | %FileCheck %s
func return10() -> UInt32 {
return return7() + 3
}
// Sanity check that we tell Clang to generate optimizable code when
// we're optimizing.
// CHECK: define internal i32 @return7() [[CLANG_ATTRS:#[0-9]+]] {
// CHECK: attributes [[CLANG_ATTRS]] = {
// CHECK-NOT: noinline
// CHECK-SAME: }