[llvm-branch-commits] [clang] 699e2a6 - Prefer __vector over vector keyword for altivec

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 11 01:29:40 PST 2020


Author: serge-sans-paille
Date: 2020-02-11T10:26:55+01:00
New Revision: 699e2a6c5551eacf10be7e64f579120954f55b10

URL: https://github.com/llvm/llvm-project/commit/699e2a6c5551eacf10be7e64f579120954f55b10
DIFF: https://github.com/llvm/llvm-project/commit/699e2a6c5551eacf10be7e64f579120954f55b10.diff

LOG: Prefer __vector over vector keyword for altivec

`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.

Differential Revision: https://reviews.llvm.org/D74129

(cherry picked from commit 3185c30c54d0af5bffbff3bcfd721668d086ff10)

Added: 
    

Modified: 
    clang/lib/Lex/Lexer.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 648bda270578..981111d03744 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -2552,8 +2552,8 @@ bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr,
         '/', '/', '/', '/',  '/', '/', '/', '/',
         '/', '/', '/', '/',  '/', '/', '/', '/'
       };
-      while (CurPtr+16 <= BufferEnd &&
-             !vec_any_eq(*(const vector unsigned char*)CurPtr, Slashes))
+      while (CurPtr + 16 <= BufferEnd &&
+             !vec_any_eq(*(const __vector unsigned char *)CurPtr, Slashes))
         CurPtr += 16;
 #else
       // Scan for '/' quickly.  Many block comments are very large.


        


More information about the llvm-branch-commits mailing list