diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/OpenMP/linking.c | 55 | ||||
-rw-r--r-- | clang/test/OpenMP/openmp_common.c | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_ast_print.cpp | 6 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_default_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_firstprivate_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_if_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_private_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/parallel_shared_messages.cpp | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/predefined_macro.c | 12 | ||||
-rw-r--r-- | clang/test/OpenMP/simd_ast_print.cpp | 6 | ||||
-rw-r--r-- | clang/test/OpenMP/simd_misc_messages.c | 2 | ||||
-rw-r--r-- | clang/test/OpenMP/threadprivate_ast_print.cpp | 6 | ||||
-rw-r--r-- | clang/test/OpenMP/threadprivate_messages.cpp | 2 |
14 files changed, 78 insertions, 25 deletions
diff --git a/clang/test/OpenMP/linking.c b/clang/test/OpenMP/linking.c index 31fd57de926..586e4606d10 100644 --- a/clang/test/OpenMP/linking.c +++ b/clang/test/OpenMP/linking.c @@ -1,5 +1,5 @@ // Test the that the driver produces reasonable linker invocations with -// -fopenmp. +// -fopenmp or -fopenmp=libiomp5|libgomp. // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp -target i386-unknown-linux \ @@ -14,3 +14,56 @@ // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" // CHECK-LD-64: "-lgomp" "-lrt" "-lgcc" // CHECK-LD-64: "-lpthread" "-lc" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=libgomp -target i386-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-32 %s +// CHECK-GOMP-LD-32: "{{.*}}ld{{(.exe)?}}" +// CHECK-GOMP-LD-32: "-lgomp" "-lrt" "-lgcc" +// CHECK-GOMP-LD-32: "-lpthread" "-lc" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=libgomp -target x86_64-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-64 %s +// CHECK-GOMP-LD-64: "{{.*}}ld{{(.exe)?}}" +// CHECK-GOMP-LD-64: "-lgomp" "-lrt" "-lgcc" +// CHECK-GOMP-LD-64: "-lpthread" "-lc" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=libiomp5 -target i386-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s +// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}" +// CHECK-IOMP5-LD-32: "-liomp5" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=libiomp5 -target x86_64-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s +// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}" +// CHECK-IOMP5-LD-64: "-liomp5" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=lib -target i386-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-32 %s +// CHECK-LIB-LD-32: error: unsupported argument 'lib' to option 'fopenmp=' +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp=lib -target x86_64-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-64 %s +// CHECK-LIB-LD-64: error: unsupported argument 'lib' to option 'fopenmp=' +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp -fopenmp=libiomp5 -target i386-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-32 %s +// CHECK-LD-WARN-32: warning: argument unused during compilation: '-fopenmp=libiomp5' +// CHECK-LD-WARN-32: "{{.*}}ld{{(.exe)?}}" +// CHECK-LD-WARN-32: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-WARN-32: "-lpthread" "-lc" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -fopenmp -fopenmp=libiomp5 -target x86_64-unknown-linux \ +// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-64 %s +// CHECK-LD-WARN-64: warning: argument unused during compilation: '-fopenmp=libiomp5' +// CHECK-LD-WARN-64: "{{.*}}ld{{(.exe)?}}" +// CHECK-LD-WARN-64: "-lgomp" "-lrt" "-lgcc" +// CHECK-LD-WARN-64: "-lpthread" "-lc" +// diff --git a/clang/test/OpenMP/openmp_common.c b/clang/test/OpenMP/openmp_common.c index 3765f4c5dc1..3131b3045b6 100644 --- a/clang/test/OpenMP/openmp_common.c +++ b/clang/test/OpenMP/openmp_common.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s #pragma omp // expected-error {{expected an OpenMP directive}} #pragma omp unknown_directive // expected-error {{expected an OpenMP directive}} diff --git a/clang/test/OpenMP/parallel_ast_print.cpp b/clang/test/OpenMP/parallel_ast_print.cpp index e76a410522e..bd5171435e5 100644 --- a/clang/test/OpenMP/parallel_ast_print.cpp +++ b/clang/test/OpenMP/parallel_ast_print.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s -// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // expected-no-diagnostics #ifndef HEADER diff --git a/clang/test/OpenMP/parallel_default_messages.cpp b/clang/test/OpenMP/parallel_default_messages.cpp index cbc6a73fe35..6014cdfd4bc 100644 --- a/clang/test/OpenMP/parallel_default_messages.cpp +++ b/clang/test/OpenMP/parallel_default_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s void foo(); diff --git a/clang/test/OpenMP/parallel_firstprivate_messages.cpp b/clang/test/OpenMP/parallel_firstprivate_messages.cpp index 780059e282b..9df45c60e70 100644 --- a/clang/test/OpenMP/parallel_firstprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_firstprivate_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s void foo() { } diff --git a/clang/test/OpenMP/parallel_if_messages.cpp b/clang/test/OpenMP/parallel_if_messages.cpp index 97096dfae3e..1559692a989 100644 --- a/clang/test/OpenMP/parallel_if_messages.cpp +++ b/clang/test/OpenMP/parallel_if_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s void foo() { } diff --git a/clang/test/OpenMP/parallel_messages.cpp b/clang/test/OpenMP/parallel_messages.cpp index 8aee8414f03..1e0edbc6f80 100644 --- a/clang/test/OpenMP/parallel_messages.cpp +++ b/clang/test/OpenMP/parallel_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -std=c++11 -o - %s void foo() { } diff --git a/clang/test/OpenMP/parallel_private_messages.cpp b/clang/test/OpenMP/parallel_private_messages.cpp index 2037d56daf0..6dc55e55747 100644 --- a/clang/test/OpenMP/parallel_private_messages.cpp +++ b/clang/test/OpenMP/parallel_private_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s void foo() { } diff --git a/clang/test/OpenMP/parallel_shared_messages.cpp b/clang/test/OpenMP/parallel_shared_messages.cpp index 211d392fe04..8363989439b 100644 --- a/clang/test/OpenMP/parallel_shared_messages.cpp +++ b/clang/test/OpenMP/parallel_shared_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s void foo() { } diff --git a/clang/test/OpenMP/predefined_macro.c b/clang/test/OpenMP/predefined_macro.c index 3a811862096..06f98793fb9 100644 --- a/clang/test/OpenMP/predefined_macro.c +++ b/clang/test/OpenMP/predefined_macro.c @@ -1,32 +1,32 @@ -// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s // RUN: %clang_cc1 -verify -o - %s // expected-no-diagnostics #ifdef FOPENMP -// -fopenmp option is specified +// -fopenmp=libiomp5 option is specified #ifndef _OPENMP #error "No _OPENMP macro is defined with -fopenmp option" #elsif _OPENMP != 201107 #error "_OPENMP has incorrect value" #endif //_OPENMP #else -// No -fopenmp option is specified +// No -fopenmp=libiomp5 option is specified #ifdef _OPENMP #error "_OPENMP macro is defined without -fopenmp option" #endif // _OPENMP #endif // FOPENMP -// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s // RUN: %clang_cc1 -verify -o - %s // expected-no-diagnostics #ifdef FOPENMP -// -fopenmp option is specified +// -fopenmp=libiomp5 option is specified #ifndef _OPENMP #error "No _OPENMP macro is defined with -fopenmp option" #elsif _OPENMP != 201107 #error "_OPENMP has incorrect value" #endif // _OPENMP #else -// No -fopenmp option is specified +// No -fopenmp=libiomp5 option is specified #ifdef _OPENMP #error "_OPENMP macro is defined without -fopenmp option" #endif // _OPENMP diff --git a/clang/test/OpenMP/simd_ast_print.cpp b/clang/test/OpenMP/simd_ast_print.cpp index 7cdf131b084..fd9668c4363 100644 --- a/clang/test/OpenMP/simd_ast_print.cpp +++ b/clang/test/OpenMP/simd_ast_print.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s -// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // expected-no-diagnostics #ifndef HEADER diff --git a/clang/test/OpenMP/simd_misc_messages.c b/clang/test/OpenMP/simd_misc_messages.c index 90a7bb441e3..622c4389b5f 100644 --- a/clang/test/OpenMP/simd_misc_messages.c +++ b/clang/test/OpenMP/simd_misc_messages.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}} #pragma omp simd diff --git a/clang/test/OpenMP/threadprivate_ast_print.cpp b/clang/test/OpenMP/threadprivate_ast_print.cpp index 1cbc0165c3f..bf3b30550ad 100644 --- a/clang/test/OpenMP/threadprivate_ast_print.cpp +++ b/clang/test/OpenMP/threadprivate_ast_print.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s -// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s -// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print +// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s +// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print // expected-no-diagnostics #ifndef HEADER diff --git a/clang/test/OpenMP/threadprivate_messages.cpp b/clang/test/OpenMP/threadprivate_messages.cpp index 943fca51058..4e50c6f9d46 100644 --- a/clang/test/OpenMP/threadprivate_messages.cpp +++ b/clang/test/OpenMP/threadprivate_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp=libiomp5 -ferror-limit 100 %s #pragma omp threadprivate // expected-error {{expected '(' after 'threadprivate'}} #pragma omp threadprivate( // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-note {{to match this '('}} |