diff options
author | Zarko Todorovski <zarko@ca.ibm.com> | 2021-05-13 10:44:40 -0400 |
---|---|---|
committer | Zarko Todorovski <zarko@ca.ibm.com> | 2021-05-13 11:48:32 -0400 |
commit | 8fa168fc50ba4f63b79773c947ef5b3e43d5c02f (patch) | |
tree | cf0db722e0061a7d3a469f25cda9ad3dad68b49c /clang/lib/Parse/Parser.cpp | |
parent | b1a074951ff78bf06a2d944c01ca0a0fcd63dd33 (diff) | |
download | llvm-8fa168fc50ba4f63b79773c947ef5b3e43d5c02f.zip llvm-8fa168fc50ba4f63b79773c947ef5b3e43d5c02f.tar.gz llvm-8fa168fc50ba4f63b79773c947ef5b3e43d5c02f.tar.bz2 |
Parse vector bool when stdbool.h and altivec.h are included
Currently when including stdbool.h and altivec.h declaration of `vector bool` leads to
errors due to `bool` being expanded to '_Bool`. This patch allows the parser
to recognize `_Bool`.
Reviewed By: hubert.reinterpretcast, Everybody0523
Differential Revision: https://reviews.llvm.org/D102064
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index b178b56..1ae3ed4f 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -503,10 +503,12 @@ void Parser::Initialize() { Ident_vector = nullptr; Ident_bool = nullptr; + Ident_Bool = nullptr; Ident_pixel = nullptr; if (getLangOpts().AltiVec || getLangOpts().ZVector) { Ident_vector = &PP.getIdentifierTable().get("vector"); Ident_bool = &PP.getIdentifierTable().get("bool"); + Ident_Bool = &PP.getIdentifierTable().get("_Bool"); } if (getLangOpts().AltiVec) Ident_pixel = &PP.getIdentifierTable().get("pixel"); |