Peter Collingbourne 41af7c2fdc Implement the flatten attribute.
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
2014-05-20 17:12:51 +00:00

11 lines
214 B
C++

// RUN: %clang_cc1 -triple=x86_64-linux-gnu -std=c++11 %s -emit-llvm -o - | FileCheck %s
void f(void) {}
[[gnu::flatten]]
// CHECK: define void @_Z1gv()
void g(void) {
// CHECK-NOT: call {{.*}} @_Z1fv
f();
}