mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-27 15:28:53 -04:00

This is a GNU attribute that causes calls within the attributed function to be inlined where possible. It is implemented by giving such calls the alwaysinline attribute. Differential Revision: http://reviews.llvm.org/D3816 llvm-svn: 209217
20 lines
335 B
C
20 lines
335 B
C
// RUN: %clang_cc1 -triple=x86_64-linux-gnu %s -emit-llvm -o - | FileCheck %s
|
|
|
|
void f(void) {}
|
|
|
|
__attribute__((noinline)) void ni(void) {}
|
|
|
|
__attribute__((flatten))
|
|
// CHECK: define void @g()
|
|
void g(void) {
|
|
// CHECK-NOT: call {{.*}} @f
|
|
f();
|
|
// CHECK: call {{.*}} @ni
|
|
ni();
|
|
}
|
|
|
|
void h(void) {
|
|
// CHECK: call {{.*}} @f
|
|
f();
|
|
}
|