2009-12-16 04:14:24 +08:00
|
|
|
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
2009-09-12 02:49:46 +08:00
|
|
|
|
2012-04-11 04:14:15 +08:00
|
|
|
// CHECK: store i32 59, i32* %size
|
|
|
|
// CHECK: store i32 65, i32* %size
|
2009-09-12 02:49:46 +08:00
|
|
|
template<typename T>
|
|
|
|
class TemplateClass {
|
|
|
|
public:
|
|
|
|
void templateClassFunction() {
|
|
|
|
int size = sizeof(__PRETTY_FUNCTION__);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2012-04-11 04:14:15 +08:00
|
|
|
// CHECK: store i32 35, i32* %size
|
|
|
|
// CHECK: store i32 38, i32* %size
|
2009-09-12 02:49:46 +08:00
|
|
|
template<typename T>
|
|
|
|
void functionTemplate(T t) {
|
|
|
|
int size = sizeof(__PRETTY_FUNCTION__);
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
TemplateClass<int> t1;
|
|
|
|
t1.templateClassFunction();
|
|
|
|
TemplateClass<double> t2;
|
|
|
|
t2.templateClassFunction();
|
|
|
|
|
|
|
|
functionTemplate<int>(0);
|
|
|
|
functionTemplate(0.0);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|