diff options
author | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 06:34:17 +0300 |
---|---|---|
committer | Anton Zabaznov <anton.zabaznov@intel.com> | 2021-07-30 06:34:29 +0300 |
commit | da6626d12624675c46a73e8545fecc572695efeb (patch) | |
tree | f08c44487470ece0f9c7be15f3d7753596807f32 /clang/lib/Parse/ParseDecl.cpp | |
parent | d1e4b25756730576996457ba7324e9bf210e3693 (diff) | |
download | llvm-da6626d12624675c46a73e8545fecc572695efeb.zip llvm-da6626d12624675c46a73e8545fecc572695efeb.tar.gz llvm-da6626d12624675c46a73e8545fecc572695efeb.tar.bz2 |
Revert "[OpenCL] Add support of __opencl_c_pipes feature macro."
This reverts commit d1e4b25756730576996457ba7324e9bf210e3693.
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 9393235..f4f5f46 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -3952,12 +3952,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, Tok.getIdentifierInfo()->revertTokenIDToIdentifier(); Tok.setKind(tok::identifier); goto DoneWithDeclSpec; - } else if (!getLangOpts().OpenCLPipes) { - DiagID = diag::err_opencl_unknown_type_specifier; - PrevSpec = Tok.getIdentifierInfo()->getNameStart(); - isInvalid = true; - } else - isInvalid = DS.SetTypePipe(true, Loc, PrevSpec, DiagID, Policy); + } + isInvalid = DS.SetTypePipe(true, Loc, PrevSpec, DiagID, Policy); break; // We only need to enumerate each image type once. #define IMAGE_READ_WRITE_TYPE(Type, Id, Ext) @@ -5130,10 +5126,8 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { switch (Tok.getKind()) { default: return false; - // OpenCL 2.0 and later define this keyword. case tok::kw_pipe: - return (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) || - getLangOpts().OpenCLCPlusPlus; + return getLangOpts().OpenCLPipe; case tok::identifier: // foo::bar // Unfortunate hack to support "Class.factoryMethod" notation. @@ -5662,9 +5656,7 @@ static bool isPtrOperatorToken(tok::TokenKind Kind, const LangOptions &Lang, if (Kind == tok::star || Kind == tok::caret) return true; - // OpenCL 2.0 and later define this keyword. - if (Kind == tok::kw_pipe && - ((Lang.OpenCL && Lang.OpenCLVersion >= 200) || Lang.OpenCLCPlusPlus)) + if (Kind == tok::kw_pipe && Lang.OpenCLPipe) return true; if (!Lang.CPlusPlus) |