brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 92d75da Raw
26 lines · cpp
1// REQUIRES: x86-registered-target2// Test this without PCH.3// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h %s -emit-llvm -o %t.no_pch.ll %s4// RUN: FileCheck --input-file %t.no_pch.ll %s5 6// Test with PCH.7// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h8// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s9// RUN: FileCheck --input-file %t.pch.ll %s10 11// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -fpch-instantiate-templates -o %t.pch %S/local_static.h12// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s13// RUN: FileCheck --input-file %t.pch.ll %s14 15void test(Bar &b) {16  b.f<int>();17  static int s;18}19 20// Check if the mangling of static and local extern variables21// are correct and preserved by PCH.22 23// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 424// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 425 26