blob: 51a84f74a650b9a5b6aa84c37a65c063886d9783 [file] [log] [blame]
Rafael Espindola19f74ac2011-07-06 15:46:09 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2
3// This was a problem in Sema, but only shows up as noinline missing
4// in CodeGen.
5
Bill Wendling3bba3ef2013-02-20 19:30:01 +00006// CHECK: define linkonce_odr void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]]
Rafael Espindola19f74ac2011-07-06 15:46:09 +00007
8template <class Ty> struct Vector {
9 void growStorageBy();
10};
11template <class T> __attribute__((noinline)) void Vector<T>::growStorageBy() {
12}
13void foo() {
14 Vector<int> strs;
15 strs.growStorageBy();
16}
Bill Wendlingf7a9da02013-02-20 07:22:19 +000017
Bill Wendling3bba3ef2013-02-20 19:30:01 +000018// CHECK: attributes [[NI]] = { noinline nounwind{{.*}} }