mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 23:06:05 +00:00

The default version of OpenMP is updated from 5.0 to 5.1 which means if -fopenmp is specified but -fopenmp-version is not specified with clang, the default version of OpenMP is taken to be 5.1. After modifying the Frontend for that, various LIT tests were updated. This patch contains all such changes. At a high level, these are the patterns of changes observed in LIT tests - # RUN lines which mentioned `-fopenmp-version=50` need to kept only if the IR for version 5.0 and 5.1 are different. Otherwise only one RUN line with no version info(i.e. default version) needs to be there. # Test cases of this sort already had the RUN lines with respect to the older default version 5.0 and the version 5.1. Only swapping the version specification flag `-fopenmp-version` from newer version RUN line to older version RUN line is required. # Diagnostics: Remove the 5.0 version specific RUN lines if there was no difference in the Diagnostics messages with respect to the default 5.1. # Diagnostics: In case there was any difference in diagnostics messages between 5.0 and 5.1, mention version specific messages in tests. # If the test contained version specific ifdef's e.g. "#ifdef OMP5" but there were no RUN lines for any other version than 5.X, then bring the code guarded by ifdef's outside and remove the ifdef's. # Some tests had RUN lines for both 5.0 and 5.1 versions, but it is found that the IR for 5.0 is not different from the 5.1, therefore such RUN lines are redundant. So, such duplicated lines are removed. # To generate CHECK lines automatically, use the script llvm/utils/update_cc_test_checks.py Reviewed By: saiislam, ABataev Differential Revision: https://reviews.llvm.org/D129635 (cherry picked from commit 9dd2999907dc791136a75238a6000f69bf67cf4e)
28 lines
1.9 KiB
C
28 lines
1.9 KiB
C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
|
|
|
|
typedef unsigned long omp_event_handle_t;
|
|
void test(void) {
|
|
omp_event_handle_t evt;
|
|
#pragma omp task detach(evt)
|
|
;
|
|
}
|
|
|
|
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
|
|
// CHECK: `-FunctionDecl {{.*}} <line:4:1, line:8:1> line:4:6 test 'void (void)'
|
|
// CHECK-NEXT: `-CompoundStmt {{.*}} <col:17, line:8:1>
|
|
// CHECK: `-OMPTaskDirective {{.*}} <line:6:1, col:29>
|
|
// CHECK-NEXT: |-OMPDetachClause {{.+}} <col:18, col:28>
|
|
// CHECK-NEXT: | `-DeclRefExpr {{.+}} <col:25> 'omp_event_handle_t':'unsigned long' lvalue Var {{.+}} 'evt' 'omp_event_handle_t':'unsigned long'
|
|
// CHECK-NEXT: |-OMPFirstprivateClause {{.+}} <<invalid sloc>> <implicit>
|
|
// CHECK-NEXT: | `-DeclRefExpr {{.+}} <col:25> 'omp_event_handle_t':'unsigned long' lvalue Var {{.+}} 'evt' 'omp_event_handle_t':'unsigned long'
|
|
// CHECK-NEXT: `-CapturedStmt {{.*}} <line:7:3>
|
|
// CHECK-NEXT: `-CapturedDecl {{.*}} <<invalid sloc>> <invalid sloc> nothrow
|
|
// CHECK-NEXT: |-NullStmt {{.*}} <col:3>
|
|
// CHECK-NEXT: |-AlwaysInlineAttr {{.*}} <<invalid sloc>> Implicit __forceinline
|
|
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <line:6:1> col:1 implicit .global_tid. 'const int'
|
|
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .part_id. 'const int *const restrict'
|
|
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .privates. 'void *const restrict'
|
|
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .copy_fn. 'void (*const restrict)(void *const restrict, ...)'
|
|
// CHECK-NEXT: |-ImplicitParamDecl {{.*}} <col:1> col:1 implicit .task_t. 'void *const'
|
|
// CHECK-NEXT: `-ImplicitParamDecl {{.*}} <col:1> col:1 implicit __context 'struct (unnamed at {{.*}}ast-dump-openmp-task.c:6:1) *const restrict'
|