Skip to content

Commit 83ce8a4

Browse files
authored
[clang][bytecode] Get BuiltinID from the direct callee (#139675)
getBuiltinCallee() just checks the direct callee for its builtin id anyway, so let's do this ourselves.
1 parent 6456ee0 commit 83ce8a4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4874,10 +4874,13 @@ bool Compiler<Emitter>::VisitBuiltinCallExpr(const CallExpr *E,
48744874

48754875
template <class Emitter>
48764876
bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E) {
4877-
if (unsigned BuiltinID = E->getBuiltinCallee())
4878-
return VisitBuiltinCallExpr(E, BuiltinID);
4879-
48804877
const FunctionDecl *FuncDecl = E->getDirectCallee();
4878+
4879+
if (FuncDecl) {
4880+
if (unsigned BuiltinID = FuncDecl->getBuiltinID())
4881+
return VisitBuiltinCallExpr(E, BuiltinID);
4882+
}
4883+
48814884
// Calls to replaceable operator new/operator delete.
48824885
if (FuncDecl &&
48834886
FuncDecl->isUsableAsGlobalAllocationFunctionInConstantEvaluation()) {

0 commit comments

Comments
 (0)