| 1 |
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
| 2 |
|
| 3 |
// CHECK: store i32 59, ptr %size |
| 4 |
// CHECK: store i32 65, ptr %size |
| 5 |
template<typename T> |
| 6 |
class TemplateClass { |
| 7 |
public: |
| 8 |
void templateClassFunction() { |
| 9 |
int size = sizeof(__PRETTY_FUNCTION__); |
| 10 |
} |
| 11 |
}; |
| 12 |
|
| 13 |
// CHECK: store i32 35, ptr %size |
| 14 |
// CHECK: store i32 38, ptr %size |
| 15 |
template<typename T> |
| 16 |
void functionTemplate(T t) { |
| 17 |
int size = sizeof(__PRETTY_FUNCTION__); |
| 18 |
} |
| 19 |
|
| 20 |
int main() { |
| 21 |
TemplateClass<int> t1; |
| 22 |
t1.templateClassFunction(); |
| 23 |
TemplateClass<double> t2; |
| 24 |
t2.templateClassFunction(); |
| 25 |
|
| 26 |
functionTemplate<int>(0); |
| 27 |
functionTemplate(0.0); |
| 28 |
|
| 29 |
return 0; |
| 30 |
} |