[clang] 3185c30 - Prefer __vector over vector keyword for altivec
via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 10 11:23:59 PST 2020
Author: serge-sans-paille
Date: 2020-02-10T20:23:26+01:00
New Revision: 3185c30c54d0af5bffbff3bcfd721668d086ff10
URL: https://github.com/llvm/llvm-project/commit/3185c30c54d0af5bffbff3bcfd721668d086ff10
DIFF: https://github.com/llvm/llvm-project/commit/3185c30c54d0af5bffbff3bcfd721668d086ff10.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
Added:
Modified:
clang/lib/Lex/Lexer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 9034726560dc..a51745697b11 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 cfe-commits
mailing list