diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/ASTContext.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 4f1df7cdf1..f732a7531d 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -9282,13 +9282,13 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, Unsigned = true; break; case 'L': - assert(!IsSpecial && "Can't use 'L' with 'W', 'N' or 'Z' modifiers"); + assert(!IsSpecial && "Can't use 'L' with 'W', 'N', 'Z' or 'O' modifiers"); assert(HowLong <= 2 && "Can't have LLLL modifier"); ++HowLong; break; case 'N': // 'N' behaves like 'L' for all non LP64 targets and 'int' otherwise. - assert(!IsSpecial && "Can't use two 'N', 'W' or 'Z' modifiers!"); + assert(!IsSpecial && "Can't use two 'N', 'W', 'Z' or 'O' modifiers!"); assert(HowLong == 0 && "Can't use both 'L' and 'N' modifiers!"); #ifndef NDEBUG IsSpecial = true; @@ -9298,7 +9298,7 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, break; case 'W': // This modifier represents int64 type. - assert(!IsSpecial && "Can't use two 'N', 'W' or 'Z' modifiers!"); + assert(!IsSpecial && "Can't use two 'N', 'W', 'Z' or 'O' modifiers!"); assert(HowLong == 0 && "Can't use both 'L' and 'W' modifiers!"); #ifndef NDEBUG IsSpecial = true; @@ -9316,7 +9316,7 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, break; case 'Z': // This modifier represents int32 type. - assert(!IsSpecial && "Can't use two 'N', 'W' or 'Z' modifiers!"); + assert(!IsSpecial && "Can't use two 'N', 'W', 'Z' or 'O' modifiers!"); assert(HowLong == 0 && "Can't use both 'L' and 'Z' modifiers!"); #ifndef NDEBUG IsSpecial = true; @@ -9335,6 +9335,17 @@ static QualType DecodeTypeFromStr(const char *&Str, const ASTContext &Context, break; } break; + case 'O': + assert(!IsSpecial && "Can't use two 'N', 'W', 'Z' or 'O' modifiers!"); + assert(HowLong == 0 && "Can't use both 'L' and 'O' modifiers!"); + #ifndef NDEBUG + IsSpecial = true; + #endif + if (Context.getLangOpts().OpenCL) + HowLong = 1; + else + HowLong = 2; + break; } } |