[clang] [clang][bytecode] Reapply "Use tailcalls via `[[clang::musttail]]`" (PR #188419)

Lukas Sommer via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 30 05:03:01 PDT 2026


Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/188419 at github.com>


sommerlukas wrote:

> Can you quickly verify whether the `preservenone` calling convention (top of `Interp.h`) is the problem or the tailcalls themselves (top of `Interp.cpp`)?

For me locally, the `preservenone` seems to be the issue. I can successfully build with ASAN and Clang 19 when removing it like this: 
```diff
diff --git a/clang/lib/AST/ByteCode/Interp.h b/clang/lib/AST/ByteCode/Interp.h
index 3578ef9da820..16e370f73313 100644
--- a/clang/lib/AST/ByteCode/Interp.h
+++ b/clang/lib/AST/ByteCode/Interp.h
@@ -40,7 +40,7 @@
 // enabled. See https://github.com/llvm/llvm-project/issues/177519.
 #if !defined(__aarch64__) && !defined(__i386__) &&                             \
     __has_cpp_attribute(clang::preserve_none)
-#define PRESERVE_NONE [[clang::preserve_none]]
+#define PRESERVE_NONE
 #else
 #define PRESERVE_NONE
 #endif
```

https://github.com/llvm/llvm-project/pull/188419


More information about the cfe-commits mailing list