[clang] [Clang][Lexer] Reland "Detect SSE4.2 availability at runtime in fastParseASCIIIdentifier" (PR #175452)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 14 07:57:46 PST 2026
================
@@ -1943,14 +1956,22 @@ fastParseASCIIIdentifier(const char *CurPtr,
continue;
return CurPtr;
}
-#endif
- unsigned char C = *CurPtr;
- while (isAsciiIdentifierContinue(C))
- C = *++CurPtr;
- return CurPtr;
+ return fastParseASCIIIdentifierScalar(CurPtr);
}
+#ifndef __SSE4_2__
+__attribute__((target("default")))
+#endif
+#endif
+#ifndef __SSE4_2__
+static const char *
+fastParseASCIIIdentifier(const char *CurPtr,
+ [[maybe_unused]] const char *BufferEnd) {
----------------
AaronBallman wrote:
```suggestion
const char *) {
```
This makes it more clear it's always unused.
https://github.com/llvm/llvm-project/pull/175452
More information about the cfe-commits
mailing list