brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 67757a9 Raw
30 lines · cpp
1// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s2// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s3// RUN: %clang_cc1 -fopenmp -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s4 5// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -triple x86_64-unknown-unknown -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck --check-prefix SIMD-ONLY1 %s6// RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s7// RUN: %clang_cc1 -fopenmp-simd -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -debug-info-kind=limited -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix SIMD-ONLY1 %s8// SIMD-ONLY1-NOT: {{__kmpc|__tgt}}9 10// expected-no-diagnostics11//12#ifndef HEADER13#define HEADER14 15// CHECK: @{{.*}}Foo{{.*}}bar{{.*}} ={{.*}} constant i32 1,16 17// Section A - Define a class with a static constexpr data member.18struct Foo {19  static constexpr int bar = 1;20};21 22// Section B - ODR-use the data member.23void F(const int &);24void Test() { F(Foo::bar); }25 26// Section C - Define the data member.27constexpr int Foo::bar;28#endif29 30