Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s |
Rafael Espindola | 19f74ac | 2011-07-06 15:46:09 +0000 | [diff] [blame] | 2 | |
| 3 | // This was a problem in Sema, but only shows up as noinline missing |
| 4 | // in CodeGen. |
| 5 | |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 6 | // CHECK: define linkonce_odr {{.*}}void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]] |
Rafael Espindola | 19f74ac | 2011-07-06 15:46:09 +0000 | [diff] [blame] | 7 | |
| 8 | template <class Ty> struct Vector { |
| 9 | void growStorageBy(); |
| 10 | }; |
| 11 | template <class T> __attribute__((noinline)) void Vector<T>::growStorageBy() { |
| 12 | } |
| 13 | void foo() { |
| 14 | Vector<int> strs; |
| 15 | strs.growStorageBy(); |
| 16 | } |
Bill Wendling | f7a9da0 | 2013-02-20 07:22:19 +0000 | [diff] [blame] | 17 | |
Bill Wendling | 3bba3ef | 2013-02-20 19:30:01 +0000 | [diff] [blame] | 18 | // CHECK: attributes [[NI]] = { noinline nounwind{{.*}} } |