119f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola// RUN: %clang_cc1 %s  -emit-llvm -o - | FileCheck %s
219f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola
319f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola// This was a problem in Sema, but only shows up as noinline missing
419f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola// in CodeGen.
519f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola
63bba3efba0e57071d60b355ed62639f93e37711cBill Wendling// CHECK: define linkonce_odr void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]]
719f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola
819f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindolatemplate <class Ty> struct Vector  {
919f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola  void growStorageBy();
1019f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola};
1119f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindolatemplate <class T> __attribute__((noinline)) void Vector<T>::growStorageBy() {
1219f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola}
1319f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindolavoid foo() {
1419f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola Vector<int> strs;
1519f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola strs.growStorageBy();
1619f74acdf8842ceece578b7307884f5ba22d7f59Rafael Espindola}
17f7a9da053f5bd6c18450c1796d953b42c3b7ad3aBill Wendling
183bba3efba0e57071d60b355ed62639f93e37711cBill Wendling// CHECK: attributes [[NI]] = { noinline nounwind{{.*}} }
19