[clang] 5f05d5e - Revert "[Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895)"
Mitch Phillips via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 23 02:24:00 PDT 2024
Author: Mitch Phillips
Date: 2024-07-23T11:23:53+02:00
New Revision: 5f05d5ec8f9bb15c0ac29fce843a2c73165ac414
URL: https://github.com/llvm/llvm-project/commit/5f05d5ec8f9bb15c0ac29fce843a2c73165ac414
DIFF: https://github.com/llvm/llvm-project/commit/5f05d5ec8f9bb15c0ac29fce843a2c73165ac414.diff
LOG: Revert "[Clang][Interp] `__builtin_os_log_format_buffer_size` should be an unevaluated builtin (#99895)"
This reverts commit 4572efea90f2ddf51c618790a119ad9b6fc2c7ed.
Reason: Introduced a memory leak that broke the sanitizer buildbots.
More information available in the original pull request
(https://github.com/llvm/llvm-project/pull/99895).
Added:
Modified:
clang/lib/AST/Interp/ByteCodeEmitter.cpp
clang/test/CodeGen/builtins.c
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/ByteCodeEmitter.cpp b/clang/lib/AST/Interp/ByteCodeEmitter.cpp
index fee4432a8f661..a3d4c7d7392da 100644
--- a/clang/lib/AST/Interp/ByteCodeEmitter.cpp
+++ b/clang/lib/AST/Interp/ByteCodeEmitter.cpp
@@ -27,8 +27,7 @@ using namespace clang::interp;
/// Similar information is available via ASTContext::BuiltinInfo,
/// but that is not correct for our use cases.
static bool isUnevaluatedBuiltin(unsigned BuiltinID) {
- return BuiltinID == Builtin::BI__builtin_classify_type ||
- BuiltinID == Builtin::BI__builtin_os_log_format_buffer_size;
+ return BuiltinID == Builtin::BI__builtin_classify_type;
}
Function *ByteCodeEmitter::compileFunc(const FunctionDecl *FuncDecl) {
diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c
index 1f998236501d2..b41efb59e61db 100644
--- a/clang/test/CodeGen/builtins.c
+++ b/clang/test/CodeGen/builtins.c
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -emit-llvm -o %t %s
// RUN: not grep __builtin %t
// RUN: %clang_cc1 -emit-llvm -triple x86_64-darwin-apple -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -triple x86_64-darwin-apple -fexperimental-new-constant-interpreter -o - %s | FileCheck %s
int printf(const char *, ...);
More information about the cfe-commits
mailing list