summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-11-22 20:39:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-11-22 20:39:31 +0000
commit900f1defddcb604c76a9f55411183fd199533e94 (patch)
treeadbb47eab1900d54f688a8656386d0d5f4973bf3
parentbcf6a37a58095b9afbe0d467aa4e6d83b6d3914e (diff)
downloadbcm5719-llvm-900f1defddcb604c76a9f55411183fd199533e94.tar.gz
bcm5719-llvm-900f1defddcb604c76a9f55411183fd199533e94.zip
Remove assert from hot code path and add a clarifying comment.
The assert wasn't adding much value but slowed down Release+Asserts builds. llvm-svn: 145082
-rw-r--r--clang/lib/Lex/Lexer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index a1155798433..a9b11d69c9e 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/lib/Lex/Lexer.cpp
@@ -1920,10 +1920,10 @@ bool Lexer::SkipBlockComment(Token &Result, const char *CurPtr) {
while (CurPtr+16 <= BufferEnd) {
int cmp = _mm_movemask_epi8(_mm_cmpeq_epi8(*(__m128i*)CurPtr, Slashes));
if (cmp != 0) {
- // Adjust the pointer to the first '/' that was found.
- CurPtr += llvm::CountTrailingZeros_32(cmp);
- C = *CurPtr++;
- assert(C == '/');
+ // Adjust the pointer to point directly after the first slash. It's
+ // not necessary to set C here, it will be overwritten at the end of
+ // the outer loop.
+ CurPtr += llvm::CountTrailingZeros_32(cmp) + 1;
goto FoundSlash;
}
CurPtr += 16;
OpenPOWER on IntegriCloud