diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-30 15:12:28 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-08-30 15:12:28 +0000 |
commit | 0e98a65c8f4b429c6b14893912440d8c9503ffff (patch) | |
tree | cc8ff71ac6ecd0b6755d05618f568a273c6f4aae /lib/AST/Stmt.cpp | |
parent | a9262e954afed180c5ca29b1c52dc440238d0272 (diff) |
[OpenMP] Make the filetered clause iterator a real iterator and type safe.
This replaces the filtered generic iterator with a type-specfic one based
on dyn_cast instead of comparing the kind enum. This allows us to use
range-based for loops and eliminates casts. No functionality change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246384 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Stmt.cpp')
-rw-r--r-- | lib/AST/Stmt.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp index 22b557dadc..2169da3245 100644 --- a/lib/AST/Stmt.cpp +++ b/lib/AST/Stmt.cpp @@ -1621,18 +1621,6 @@ OMPDependClause *OMPDependClause::CreateEmpty(const ASTContext &C, unsigned N) { return new (Mem) OMPDependClause(N); } -const OMPClause * -OMPExecutableDirective::getSingleClause(OpenMPClauseKind K) const { - auto &&I = getClausesOfKind(K); - - if (I) { - auto *Clause = *I; - assert(!++I && "There are at least 2 clauses of the specified kind"); - return Clause; - } - return nullptr; -} - OMPParallelDirective *OMPParallelDirective::Create( const ASTContext &C, SourceLocation StartLoc, |