File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -233,10 +233,11 @@ static GlobalVariable *emit_plt_thunk(
233
233
else {
234
234
// musttail support is very bad on ARM, PPC, PPC64 (as of LLVM 3.9)
235
235
// Known failures includes vararg (not needed here) and sret.
236
- # if (defined(_CPU_X86_) || defined(_CPU_X86_64_) || \
237
- defined (_CPU_AARCH64_ ))
236
+
237
+ # if (defined(_CPU_X86_) || defined(_CPU_X86_64_) || (defined(_CPU_AARCH64_) && ! defined(_OS_DARWIN_) ))
238
238
// Ref https://bugs.llvm.org/show_bug.cgi?id=47058
239
239
// LLVM, as of 10.0.1 emits wrong/worse code when musttail is set
240
+ // Apple silicon macs give an LLVM ERROR if musttail is set here #44107.
240
241
if (!attrs.hasAttrSomewhere (Attribute::ByVal))
241
242
ret->setTailCallKind (CallInst::TCK_MustTail);
242
243
#endif
You can’t perform that action at this time.
0 commit comments