summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-29 18:07:07 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-29 18:07:07 +0000
commit68d230359ac12075d9b63b47ed2af5fd6ba3c740 (patch)
tree728f0e50be059a7336ec908a9081b713ed9d0889 /include
parentd32885e65203653fa258487993883c741b09c5d6 (diff)
[OPENMP] Support for -fopenmp-simd option with compilation of simd loops
only. Added support for -fopenmp-simd option that allows compilation of simd-based constructs without emission of OpenMP runtime calls. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/StmtOpenMP.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/clang/AST/StmtOpenMP.h b/include/clang/AST/StmtOpenMP.h
index 66fb037fc3..b6fd1a2c28 100644
--- a/include/clang/AST/StmtOpenMP.h
+++ b/include/clang/AST/StmtOpenMP.h
@@ -193,16 +193,20 @@ public:
bool hasAssociatedStmt() const { return NumChildren > 0; }
/// \brief Returns statement associated with the directive.
- Stmt *getAssociatedStmt() const {
+ const Stmt *getAssociatedStmt() const {
assert(hasAssociatedStmt() && "no associated statement.");
- return const_cast<Stmt *>(*child_begin());
+ return *child_begin();
+ }
+ Stmt *getAssociatedStmt() {
+ assert(hasAssociatedStmt() && "no associated statement.");
+ return *child_begin();
}
/// \brief Returns the captured statement associated with the
/// component region within the (combined) directive.
//
// \param RegionKind Component region kind.
- CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const {
+ const CapturedStmt *getCapturedStmt(OpenMPDirectiveKind RegionKind) const {
SmallVector<OpenMPDirectiveKind, 4> CaptureRegions;
getOpenMPCaptureRegions(CaptureRegions, getDirectiveKind());
assert(std::any_of(