summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-10-08 14:56:20 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-10-08 14:56:20 +0000
commit6b06ead19be79fd6e2d2abdda4c4cbb7c8f3c7c0 (patch)
tree9aa3f1510cb247d1c716dc6b4c2b4777ee70c465 /clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
parentc864f73e45ce138040b14d54dd4ad2bdcba396ea (diff)
downloadbcm5719-llvm-6b06ead19be79fd6e2d2abdda4c4cbb7c8f3c7c0.tar.gz
bcm5719-llvm-6b06ead19be79fd6e2d2abdda4c4cbb7c8f3c7c0.zip
[OPENMP50]Allow functions in declare variant directive to have different
C linkage. After some discussion with OpenMP developers, it was decided that the functions with the different C linkage can be used in declare variant directive. llvm-svn: 374057
Diffstat (limited to 'clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp')
-rw-r--r--clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp b/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
index b0940751b76..1c200cca909 100644
--- a/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
+++ b/clang/test/OpenMP/declare_variant_implementation_vendor_codegen.cpp
@@ -22,6 +22,8 @@
// CHECK-DAG: ret i32 7
// CHECK-DAG: ret i32 82
// CHECK-DAG: ret i32 83
+// CHECK-DAG: ret i32 85
+// CHECK-DAG: ret i32 86
// CHECK-NOT: ret i32 {{1|4|81|84}}
#ifndef HEADER
@@ -110,4 +112,14 @@ static int prio1_() { return 1; }
int int_fn() { return prio1_(); }
+int fn_linkage_variant() { return 85; }
+extern "C" {
+#pragma omp declare variant(fn_linkage_variant) match(implementation = {vendor(llvm)})
+int fn_linkage() { return 1; }
+}
+
+extern "C" int fn_linkage_variant1() { return 86; }
+#pragma omp declare variant(fn_linkage_variant1) match(implementation = {vendor(llvm)})
+int fn_linkage1() { return 1; }
+
#endif // HEADER
OpenPOWER on IntegriCloud