================
@@ -4443,7 +4443,16 @@ static bool interp__builtin_ia32_gfni_mul(InterpState
&S, CodePtr OpPC,
bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
uint32_t BuiltinID) {
- if (!S.getASTContext().BuiltinInfo.isConstantEvaluated(BuiltinID))
+ // BuiltinID has already been normalized (see getConstantEvaluatedBuiltinID),
+ // i.e. an auxiliary target builtin ID has been translated to its canonical
+ // value. The "is constant evaluated" check below needs the *raw* builtin ID
+ // so that aux-target IDs resolve into the correct (aux-target) builtin
+ // records; recover it from the call, falling back to BuiltinID for builtins
+ // emitted without a direct callee (e.g. operator new/delete).
+ unsigned RawBuiltinID = Call->getBuiltinCallee();
----------------
tbaederr wrote:
*sigh*, the entire point of passing the builtin id here is that getting it from
the expr is slow. Now we do it again.
https://github.com/llvm/llvm-project/pull/201805
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits