brintos

brintos / llvm-project-archived public Read only

0
0
Text · 752 B · 2802687 Raw
29 lines · cpp
1// Test without PCH.2// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %s %s -emit-llvm -o - | FileCheck %s3//4// Test with PCH.5// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header %s -emit-pch -o %t6// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - | FileCheck %s7 8#ifndef HEADER9#define HEADER10 11struct A {12  struct { int a; } a;13  struct { int b; } b;14};15 16#else17 18template<typename T> void f(T) {}19 20// CHECK-LABEL: define {{.*}}void @_Z1g1A(21void g(A a) {22  // CHECK: call {{.*}}void @_Z1fIN1AUt0_EEvT_(23  f(a.b);24  // CHECK: call {{.*}}void @_Z1fIN1AUt_EEvT_(25  f(a.a);26}27 28#endif29