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
This commit is contained in:
Benjamin Kramer 2011-11-22 20:39:31 +00:00
parent bcf6a37a58
commit 900f1defdd
1 changed files with 4 additions and 4 deletions

View File

@ -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;