diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-08 15:07:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-03-08 15:07:42 +0000 |
commit | f5140611fcbf7722d6a5632522d266e9c1d4875d (patch) | |
tree | 8181a21443c7f9e767c468118e58ad2afef14be3 | |
parent | c41db927f384a9071b144d297c3069778d49f440 (diff) | |
download | bcm5719-llvm-f5140611fcbf7722d6a5632522d266e9c1d4875d.tar.gz bcm5719-llvm-f5140611fcbf7722d6a5632522d266e9c1d4875d.zip |
Also test pr12104 with pch.
llvm-svn: 152317
-rw-r--r-- | clang/test/CodeGenCXX/pr12104.cpp | 13 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/pr12104.h | 9 |
2 files changed, 12 insertions, 10 deletions
diff --git a/clang/test/CodeGenCXX/pr12104.cpp b/clang/test/CodeGenCXX/pr12104.cpp index d126108073f..a62f04b6683 100644 --- a/clang/test/CodeGenCXX/pr12104.cpp +++ b/clang/test/CodeGenCXX/pr12104.cpp @@ -1,14 +1,7 @@ -// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -include %S/pr12104.h %s -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -x c++ -emit-pch -o %t %S/pr12104.h +// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s -template <int dimm> struct Patch { - static const unsigned int no_neighbor = 1; -}; -template <int dim> -const unsigned int Patch<dim>::no_neighbor; -void f(const unsigned int); -void g() { - f(Patch<1>::no_neighbor); -} template struct Patch<1>; // CHECK: _ZN5PatchILi1EE11no_neighborE diff --git a/clang/test/CodeGenCXX/pr12104.h b/clang/test/CodeGenCXX/pr12104.h new file mode 100644 index 00000000000..f3e9363fe19 --- /dev/null +++ b/clang/test/CodeGenCXX/pr12104.h @@ -0,0 +1,9 @@ +template <int dimm> struct Patch { + static const unsigned int no_neighbor = 1; +}; +template <int dim> +const unsigned int Patch<dim>::no_neighbor; +void f(const unsigned int); +void g() { + f(Patch<1>::no_neighbor); +} |