[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 30 22:27:03 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
The comment already explains that this is only true for _some_ builtin functions. This also brings the time it takes me to run the builtin-functions.cpp test locally from 50s down to 47s.
---
Full diff: https://github.com/llvm/llvm-project/pull/106826.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Interp.cpp (+2-1)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Interp.cpp b/clang/lib/AST/ByteCode/Interp.cpp
index 42012767c22332..c4f76a3cc03aae 100644
--- a/clang/lib/AST/ByteCode/Interp.cpp
+++ b/clang/lib/AST/ByteCode/Interp.cpp
@@ -226,7 +226,8 @@ void cleanupAfterFunctionCall(InterpState &S, CodePtr OpPC) {
// Some builtin functions require us to only look at the call site, since
// the classified parameter types do not match.
- if (CurFunc->isBuiltin()) {
+ if (unsigned BID = CurFunc->getBuiltinID();
+ BID && S.getASTContext().BuiltinInfo.hasCustomTypechecking(BID)) {
const auto *CE =
cast<CallExpr>(S.Current->Caller->getExpr(S.Current->getRetPC()));
for (int32_t I = CE->getNumArgs() - 1; I >= 0; --I) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/106826
More information about the cfe-commits
mailing list