1 // Test this without pch.
2 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -DBODY %s -o - | FileCheck %s
5 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -o %t %s
6 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -include-pch %t -DBODY %s -o - | FileCheck %s
8 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-pch -fpch-instantiate-templates -o %t %s
9 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -include-pch %t -DBODY %s -o - | FileCheck %s
11 // expected-no-diagnostics
16 void foo() { bar
<0>(); } // This will trigger implicit instantiation of bar<0>() in the PCH.
23 // But the definition is only in the source, so the instantiation must be delayed until the TU.
27 void test(A
*a
) { a
->foo(); }
30 // CHECK: define linkonce_odr void @_ZN1A3barILi0EEEvv