[llvm-branch-commits] [clang] [clang] Define ptrauth_string_discriminator builtin. (PR #93903)
Daniil Kovalev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 3 12:20:31 PDT 2024
================
@@ -12583,6 +12584,12 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E,
case Builtin::BI__builtin_expect_with_probability:
return Visit(E->getArg(0));
+ case Builtin::BI__builtin_ptrauth_string_discriminator: {
+ auto literal = cast<StringLiteral>(E->getArg(0)->IgnoreParenImpCasts());
+ auto result = getPointerAuthStableSipHash16(literal->getString());
----------------
kovdan01 wrote:
Does `auto` increase readability here? `uint64_t Result` IMHO looks better - at least, with `auto` it's not obvious which type the variable has.
https://github.com/llvm/llvm-project/pull/93903
More information about the llvm-branch-commits
mailing list