From 4f328fe1eb8aa1548a35e14c70a0aae950616ee1 Mon Sep 17 00:00:00 2001 From: Alexey Bader Date: Wed, 13 Apr 2016 08:33:41 +0000 Subject: [PATCH] [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library. Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header". This fixes the modules build. Differential revision: http://reviews.llvm.org/D18954 Reviewers: Richard Smith, Vassil Vassilev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266180 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/ASTContext.h | 2 +- include/clang/AST/Type.h | 8 ++++---- include/clang/{AST => Basic}/OpenCLImageTypes.def | 0 include/clang/Basic/Specifiers.h | 2 +- include/clang/Basic/TokenKinds.def | 2 +- include/clang/Sema/DeclSpec.h | 2 +- include/clang/Serialization/ASTBitCodes.h | 2 +- lib/AST/ASTContext.cpp | 6 +++--- lib/AST/ASTImporter.cpp | 2 +- lib/AST/ExprConstant.cpp | 2 +- lib/AST/ItaniumMangle.cpp | 2 +- lib/AST/MicrosoftMangle.cpp | 2 +- lib/AST/NSAPI.cpp | 2 +- lib/AST/Type.cpp | 4 ++-- lib/AST/TypeLoc.cpp | 2 +- lib/Analysis/PrintfFormatString.cpp | 2 +- lib/CodeGen/CGDebugInfo.cpp | 2 +- lib/CodeGen/CGDebugInfo.h | 2 +- lib/CodeGen/CGOpenCLRuntime.cpp | 2 +- lib/CodeGen/CodeGenTypes.cpp | 2 +- lib/CodeGen/ItaniumCXXABI.cpp | 2 +- lib/Index/USRGeneration.cpp | 2 +- lib/Parse/ParseDecl.cpp | 8 ++++---- lib/Parse/ParseExpr.cpp | 2 +- lib/Parse/ParseTentative.cpp | 2 +- lib/Sema/DeclSpec.cpp | 4 ++-- lib/Sema/SemaExpr.cpp | 4 ++-- lib/Sema/SemaTemplateVariadic.cpp | 2 +- lib/Sema/SemaType.cpp | 2 +- lib/Serialization/ASTCommon.cpp | 2 +- lib/Serialization/ASTReader.cpp | 2 +- tools/libclang/CIndex.cpp | 2 +- 32 files changed, 42 insertions(+), 42 deletions(-) rename include/clang/{AST => Basic}/OpenCLImageTypes.def (100%) diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 9f880e22ac..e04d976441 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -904,7 +904,7 @@ public: CanQualType ObjCBuiltinBoolTy; #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ CanQualType SingletonId; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" CanQualType OCLSamplerTy, OCLEventTy, OCLClkEventTy; CanQualType OCLQueueTy, OCLNDRangeTy, OCLReserveIDTy; CanQualType OMPArraySectionTy; diff --git a/include/clang/AST/Type.h b/include/clang/AST/Type.h index ea5491fb9d..1a968724ca 100644 --- a/include/clang/AST/Type.h +++ b/include/clang/AST/Type.h @@ -1707,7 +1707,7 @@ public: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ bool is##Id##Type() const; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" bool isImageType() const; // Any OpenCL image type @@ -2010,7 +2010,7 @@ public: enum Kind { // OpenCL image types #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) Id, -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" // All other builtin types #define BUILTIN_TYPE(Id, SingletonId) Id, #define LAST_BUILTIN_TYPE(Id) LastKind = Id @@ -5556,7 +5556,7 @@ inline bool Type::isObjCBuiltinType() const { inline bool Type::is##Id##Type() const { \ return isSpecificBuiltinType(BuiltinType::Id); \ } -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" inline bool Type::isSamplerT() const { return isSpecificBuiltinType(BuiltinType::OCLSampler); @@ -5585,7 +5585,7 @@ inline bool Type::isReserveIDT() const { inline bool Type::isImageType() const { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) is##Id##Type() || return -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" 0; // end boolean or operation } diff --git a/include/clang/AST/OpenCLImageTypes.def b/include/clang/Basic/OpenCLImageTypes.def similarity index 100% rename from include/clang/AST/OpenCLImageTypes.def rename to include/clang/Basic/OpenCLImageTypes.def diff --git a/include/clang/Basic/Specifiers.h b/include/clang/Basic/Specifiers.h index 6fb0105592..334719cd7d 100644 --- a/include/clang/Basic/Specifiers.h +++ b/include/clang/Basic/Specifiers.h @@ -74,7 +74,7 @@ namespace clang { TST_unknown_anytype, // __unknown_anytype extension TST_atomic, // C11 _Atomic #define GENERIC_IMAGE_TYPE(ImgType, Id) TST_##ImgType##_t, // OpenCL image types -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" TST_error // erroneous type }; diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index 83e8faf8b4..3d0c65718f 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -519,7 +519,7 @@ ALIAS("read_write", __read_write , KEYOPENCL) KEYWORD(__builtin_astype , KEYOPENCL) KEYWORD(vec_step , KEYOPENCL|KEYALTIVEC|KEYZVECTOR) #define GENERIC_IMAGE_TYPE(ImgType, Id) KEYWORD(ImgType##_t, KEYOPENCL) -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" // OpenMP Type Traits KEYWORD(__builtin_omp_required_simd_align, KEYALL) diff --git a/include/clang/Sema/DeclSpec.h b/include/clang/Sema/DeclSpec.h index eba0ead1cf..b9e432b5ee 100644 --- a/include/clang/Sema/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -301,7 +301,7 @@ public: static const TST TST_atomic = clang::TST_atomic; #define GENERIC_IMAGE_TYPE(ImgType, Id) \ static const TST TST_##ImgType##_t = clang::TST_##ImgType##_t; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" static const TST TST_error = clang::TST_error; // type-qualifiers diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h index ce6b53f735..9a0f905c24 100644 --- a/include/clang/Serialization/ASTBitCodes.h +++ b/include/clang/Serialization/ASTBitCodes.h @@ -801,7 +801,7 @@ namespace clang { /// \brief OpenCL image types with auto numeration #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ PREDEF_TYPE_##Id##_ID, -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" }; /// \brief The number of predefined type IDs that are reserved for diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 370155873c..fb4c80bd7f 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1093,7 +1093,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, if (LangOpts.OpenCL) { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ InitBuiltinType(SingletonId, BuiltinType::Id); -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" InitBuiltinType(OCLSamplerTy, BuiltinType::OCLSampler); InitBuiltinType(OCLEventTy, BuiltinType::OCLEvent); @@ -1673,7 +1673,7 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { case BuiltinType::OCLReserveID: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" // Currently these types are pointers to opaque types. Width = Target->getPointerWidth(0); @@ -5501,7 +5501,7 @@ static char getObjCEncodingForPrimitiveKind(const ASTContext *C, // OpenCL and placeholder types don't need @encodings. #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: case BuiltinType::OCLQueue: diff --git a/lib/AST/ASTImporter.cpp b/lib/AST/ASTImporter.cpp index d2b2c93ecb..484a445939 100644 --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -1512,7 +1512,7 @@ QualType ASTNodeImporter::VisitBuiltinType(const BuiltinType *T) { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: \ return Importer.getToContext().SingletonId; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" #define SHARED_SINGLETON_TYPE(Expansion) #define BUILTIN_TYPE(Id, SingletonId) \ case BuiltinType::Id: return Importer.getToContext().SingletonId; diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 152f46a071..b38aeff8a6 100644 --- a/lib/AST/ExprConstant.cpp +++ b/lib/AST/ExprConstant.cpp @@ -6303,7 +6303,7 @@ static int EvaluateBuiltinClassifyType(const CallExpr *E, case BuiltinType::ObjCSel: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/AST/ItaniumMangle.cpp b/lib/AST/ItaniumMangle.cpp index cc5f7aebfe..7ad464e1d9 100644 --- a/lib/AST/ItaniumMangle.cpp +++ b/lib/AST/ItaniumMangle.cpp @@ -2097,7 +2097,7 @@ void CXXNameMangler::mangleType(const BuiltinType *T) { type_name = "ocl_" #ImgType "_" #Suffix; \ Out << type_name.size() << type_name; \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: Out << "11ocl_sampler"; break; diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index 75627fc8ca..b63b5e5651 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -1721,7 +1721,7 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, case BuiltinType::Id: \ Out << "PAUocl_" #ImgType "_" #Suffix "@@"; \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: Out << "PA"; mangleArtificalTagType(TTK_Struct, "ocl_sampler"); diff --git a/lib/AST/NSAPI.cpp b/lib/AST/NSAPI.cpp index 6201200e50..4c49e4c9f6 100644 --- a/lib/AST/NSAPI.cpp +++ b/lib/AST/NSAPI.cpp @@ -447,7 +447,7 @@ NSAPI::getNSNumberFactoryMethodKind(QualType T) const { case BuiltinType::ObjCSel: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 8d0089f226..1c6ae2a2b9 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -2584,7 +2584,7 @@ StringRef BuiltinType::getName(const PrintingPolicy &Policy) const { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case Id: \ return "__" #Access " " #ImgType "_t"; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case OCLSampler: return "sampler_t"; case OCLEvent: @@ -3560,7 +3560,7 @@ bool Type::canHaveNullability() const { case BuiltinType::ObjCSel: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/AST/TypeLoc.cpp b/lib/AST/TypeLoc.cpp index 548e183e8e..05e5a627b7 100644 --- a/lib/AST/TypeLoc.cpp +++ b/lib/AST/TypeLoc.cpp @@ -335,7 +335,7 @@ TypeSpecifierType BuiltinTypeLoc::getWrittenTypeSpec() const { case BuiltinType::ObjCSel: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/Analysis/PrintfFormatString.cpp b/lib/Analysis/PrintfFormatString.cpp index 3cc982d4d0..ff44a570de 100644 --- a/lib/Analysis/PrintfFormatString.cpp +++ b/lib/Analysis/PrintfFormatString.cpp @@ -621,7 +621,7 @@ bool PrintfSpecifier::fixType(QualType QT, const LangOptions &LangOpt, #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" #define SIGNED_TYPE(Id, SingletonId) #define UNSIGNED_TYPE(Id, SingletonId) #define FLOATING_TYPE(Id, SingletonId) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 759ee54967..13ee0fb1d9 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -478,7 +478,7 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) { case BuiltinType::Id: \ return getOrCreateStructPtrType("opencl_" #ImgType "_" #Suffix "_t", \ SingletonId); -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: return DBuilder.createBasicType( "opencl_sampler_t", CGM.getContext().getTypeSize(BT), diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h index 1ba3ad8a88..669ab9db45 100644 --- a/lib/CodeGen/CGDebugInfo.h +++ b/lib/CodeGen/CGDebugInfo.h @@ -66,7 +66,7 @@ class CGDebugInfo { llvm::DIType *SelTy = nullptr; #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ llvm::DIType *SingletonId = nullptr; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" llvm::DIType *OCLEventDITy = nullptr; llvm::DIType *OCLClkEventDITy = nullptr; llvm::DIType *OCLQueueDITy = nullptr; diff --git a/lib/CodeGen/CGOpenCLRuntime.cpp b/lib/CodeGen/CGOpenCLRuntime.cpp index c89e9cc16c..38aebea18e 100644 --- a/lib/CodeGen/CGOpenCLRuntime.cpp +++ b/lib/CodeGen/CGOpenCLRuntime.cpp @@ -45,7 +45,7 @@ llvm::Type *CGOpenCLRuntime::convertOpenCLSpecificType(const Type *T) { return llvm::PointerType::get( \ llvm::StructType::create(Ctx, "opencl." #ImgType "_" #Suffix "_t"), \ ImgAddrSpc); -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: return llvm::IntegerType::get(Ctx, 32); case BuiltinType::OCLEvent: diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp index e42428fb73..33e53a6cbe 100644 --- a/lib/CodeGen/CodeGenTypes.cpp +++ b/lib/CodeGen/CodeGenTypes.cpp @@ -466,7 +466,7 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp index 25cb5fe371..b44e840533 100644 --- a/lib/CodeGen/ItaniumCXXABI.cpp +++ b/lib/CodeGen/ItaniumCXXABI.cpp @@ -2538,7 +2538,7 @@ static bool TypeInfoIsInStandardLibrary(const BuiltinType *Ty) { #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: diff --git a/lib/Index/USRGeneration.cpp b/lib/Index/USRGeneration.cpp index a15ad12b09..65de75b5c4 100644 --- a/lib/Index/USRGeneration.cpp +++ b/lib/Index/USRGeneration.cpp @@ -626,7 +626,7 @@ void USRGenerator::VisitType(QualType T) { case BuiltinType::Dependent: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: case BuiltinType::OCLQueue: diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 7a4e75c48b..b06eda9d23 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -3368,7 +3368,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, isInvalid = DS.SetTypeSpecType(DeclSpec::TST_##ImgType##_t, Loc, PrevSpec, \ DiagID, Policy); \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case tok::kw___unknown_anytype: isInvalid = DS.SetTypeSpecType(TST_unknown_anytype, Loc, PrevSpec, DiagID, Policy); @@ -4307,7 +4307,7 @@ bool Parser::isKnownToBeTypeSpecifier(const Token &Tok) const { case tok::kw__Decimal128: case tok::kw___vector: #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" // struct-or-union-specifier (C99) or class-specifier (C++) case tok::kw_class: @@ -4381,7 +4381,7 @@ bool Parser::isTypeSpecifierQualifier() { case tok::kw__Decimal128: case tok::kw___vector: #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" // struct-or-union-specifier (C99) or class-specifier (C++) case tok::kw_class: @@ -4619,7 +4619,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::kw___read_write: case tok::kw___write_only: #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" return true; } diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 12b80ba84f..2745c33776 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -1171,7 +1171,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, case tok::kw_typeof: case tok::kw___vector: #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" { if (!getLangOpts().CPlusPlus) { Diag(Tok, diag::err_expected_expression); diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index a521fbfd7b..747d0a982c 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -988,7 +988,7 @@ Parser::isExpressionOrTypeSpecifierSimple(tok::TokenKind Kind) { case tok::kw___bool: case tok::kw__Atomic: #define GENERIC_IMAGE_TYPE(ImgType, Id) case tok::kw_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case tok::kw___unknown_anytype: return TPResult::False; diff --git a/lib/Sema/DeclSpec.cpp b/lib/Sema/DeclSpec.cpp index cbe1993980..4bc1d3423b 100644 --- a/lib/Sema/DeclSpec.cpp +++ b/lib/Sema/DeclSpec.cpp @@ -303,7 +303,7 @@ bool Declarator::isDeclarationOfFunction() const { case TST_void: case TST_wchar: #define GENERIC_IMAGE_TYPE(ImgType, Id) case TST_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" return false; case TST_decltype_auto: @@ -479,7 +479,7 @@ const char *DeclSpec::getSpecifierName(DeclSpec::TST T, #define GENERIC_IMAGE_TYPE(ImgType, Id) \ case DeclSpec::TST_##ImgType##_t: \ return #ImgType "_t"; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case DeclSpec::TST_error: return "(error)"; } llvm_unreachable("Unknown typespec!"); diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 561e4777e6..a4b1525d94 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -4917,7 +4917,7 @@ static bool isPlaceholderToRemoveAsArg(QualType type) { // Ignore all the non-placeholder types. #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" #define PLACEHOLDER_TYPE(ID, SINGLETON_ID) #define BUILTIN_TYPE(ID, SINGLETON_ID) case BuiltinType::ID: #include "clang/AST/BuiltinTypes.def" @@ -14902,7 +14902,7 @@ ExprResult Sema::CheckPlaceholderExpr(Expr *E) { // Everything else should be impossible. #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" #define BUILTIN_TYPE(Id, SingletonId) case BuiltinType::Id: #define PLACEHOLDER_TYPE(Id, SingletonId) #include "clang/AST/BuiltinTypes.def" diff --git a/lib/Sema/SemaTemplateVariadic.cpp b/lib/Sema/SemaTemplateVariadic.cpp index d2b359b24c..c23b5a2adc 100644 --- a/lib/Sema/SemaTemplateVariadic.cpp +++ b/lib/Sema/SemaTemplateVariadic.cpp @@ -740,7 +740,7 @@ bool Sema::containsUnexpandedParameterPacks(Declarator &D) { case TST_auto_type: case TST_decltype_auto: #define GENERIC_IMAGE_TYPE(ImgType, Id) case TST_##ImgType##_t: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case TST_unknown_anytype: case TST_error: break; diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 3b0e3274e5..cf47d867c8 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1580,7 +1580,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { .Cases("read_write", "__read_write", Context.Id##RWTy) \ .Default(Context.Id##ROTy); \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case DeclSpec::TST_error: Result = Context.IntTy; diff --git a/lib/Serialization/ASTCommon.cpp b/lib/Serialization/ASTCommon.cpp index 76630f5e8a..2382f8ea4b 100644 --- a/lib/Serialization/ASTCommon.cpp +++ b/lib/Serialization/ASTCommon.cpp @@ -131,7 +131,7 @@ serialization::TypeIdxFromBuiltin(const BuiltinType *BT) { case BuiltinType::Id: \ ID = PREDEF_TYPE_##Id##_ID; \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: ID = PREDEF_TYPE_SAMPLER_ID; break; diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 0677ee4dbd..0c2522311a 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -6096,7 +6096,7 @@ QualType ASTReader::GetType(TypeID ID) { case PREDEF_TYPE_##Id##_ID: \ T = Context.SingletonId; \ break; -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case PREDEF_TYPE_SAMPLER_ID: T = Context.OCLSamplerTy; break; diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index a1e21e650f..994386ea4a 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1456,7 +1456,7 @@ bool CursorVisitor::VisitBuiltinTypeLoc(BuiltinTypeLoc TL) { case BuiltinType::Dependent: #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ case BuiltinType::Id: -#include "clang/AST/OpenCLImageTypes.def" +#include "clang/Basic/OpenCLImageTypes.def" case BuiltinType::OCLSampler: case BuiltinType::OCLEvent: case BuiltinType::OCLClkEvent: -- 2.50.1