r222523 - [OPENMP] Disable CapturedStmt generation for standalone directives.
Alexey Bataev
a.bataev at hotmail.com
Fri Nov 21 03:33:47 PST 2014
Author: abataev
Date: Fri Nov 21 05:33:46 2014
New Revision: 222523
URL: http://llvm.org/viewvc/llvm-project?rev=222523&view=rev
Log:
[OPENMP] Disable CapturedStmt generation for standalone directives.
No functional changes, just code improvement.
Modified:
cfe/trunk/lib/Sema/SemaOpenMP.cpp
Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaOpenMP.cpp?rev=222523&r1=222522&r2=222523&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaOpenMP.cpp (original)
+++ cfe/trunk/lib/Sema/SemaOpenMP.cpp Fri Nov 21 05:33:46 2014
@@ -1120,38 +1120,6 @@ void Sema::ActOnOpenMPRegionStart(OpenMP
Params);
break;
}
- case OMPD_taskyield: {
- Sema::CapturedParamNameType Params[] = {
- std::make_pair(StringRef(), QualType()) // __context with shared vars
- };
- ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
- Params);
- break;
- }
- case OMPD_barrier: {
- Sema::CapturedParamNameType Params[] = {
- std::make_pair(StringRef(), QualType()) // __context with shared vars
- };
- ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
- Params);
- break;
- }
- case OMPD_taskwait: {
- Sema::CapturedParamNameType Params[] = {
- std::make_pair(StringRef(), QualType()) // __context with shared vars
- };
- ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
- Params);
- break;
- }
- case OMPD_flush: {
- Sema::CapturedParamNameType Params[] = {
- std::make_pair(StringRef(), QualType()) // __context with shared vars
- };
- ActOnCapturedRegionStart(DSAStack->getConstructLoc(), CurScope, CR_OpenMP,
- Params);
- break;
- }
case OMPD_ordered: {
Sema::CapturedParamNameType Params[] = {
std::make_pair(StringRef(), QualType()) // __context with shared vars
@@ -1189,6 +1157,10 @@ void Sema::ActOnOpenMPRegionStart(OpenMP
break;
}
case OMPD_threadprivate:
+ case OMPD_taskyield:
+ case OMPD_barrier:
+ case OMPD_taskwait:
+ case OMPD_flush:
llvm_unreachable("OpenMP Directive is not allowed");
case OMPD_unknown:
llvm_unreachable("Unknown OpenMP directive");
More information about the cfe-commits
mailing list