1 // Test this without PCH.
2 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s
3 // RUN: FileCheck --input-file %t.no_pch.ll %s
4 
5 // Test with PCH.
6 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h
7 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s
8 // RUN: FileCheck --input-file %t.pch.ll %s
9 
test(Bar & b)10 void test(Bar &b) {
11   b.f<int>();
12   static int s;
13 }
14 
15 // Check if the mangling of static and local extern variables
16 // are correct and preserved by PCH.
17 
18 // CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4
19 // CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4
20 
21