mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-17 02:06:07 +00:00

- This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
31 lines
620 B
C++
31 lines
620 B
C++
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
|
|
// CHECK: store i32 49, i32* %size
|
|
// CHECK: store i32 52, i32* %size
|
|
template<typename T>
|
|
class TemplateClass {
|
|
public:
|
|
void templateClassFunction() {
|
|
int size = sizeof(__PRETTY_FUNCTION__);
|
|
}
|
|
};
|
|
|
|
// CHECK: store i32 27, i32* %size
|
|
// CHECK: store i32 30, i32* %size
|
|
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;
|
|
}
|