[PATCH] D74129: Prefer __vector over vector keyword for altivec use

serge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 07:48:17 PST 2020


serge-sans-paille created this revision.
serge-sans-paille added a reviewer: rsmith.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
serge-sans-paille added a subscriber: hans.
serge-sans-paille added a comment.
serge-sans-paille added a reviewer: hans.

@hans :  clang 10.0.0rc1  doesn't build on ppc64le in Fedora without that patch.


`vector' uses the keyword-and-predefine mode from gcc, while __vector is
reliably supported.

      

As a side effect, it also makes the code consistent in its usage of __vector.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74129

Files:
  clang/lib/Lex/Lexer.cpp


Index: clang/lib/Lex/Lexer.cpp
===================================================================
--- clang/lib/Lex/Lexer.cpp
+++ clang/lib/Lex/Lexer.cpp
@@ -2553,7 +2553,7 @@
         '/', '/', '/', '/',  '/', '/', '/', '/'
       };
       while (CurPtr+16 <= BufferEnd &&
-             !vec_any_eq(*(const vector unsigned char*)CurPtr, Slashes))
+             !vec_any_eq(*(const __vector unsigned char*)CurPtr, Slashes))
         CurPtr += 16;
 #else
       // Scan for '/' quickly.  Many block comments are very large.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74129.242902.patch
Type: text/x-patch
Size: 525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200206/0e54b2b9/attachment.bin>


More information about the cfe-commits mailing list