Skip to content

Commit 2db858f

Browse files
authored
Skip tailcall argument check for OCaml functions (#15)
1 parent 165dcb8 commit 2db858f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/lib/IR/Verifier.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3580,9 +3580,11 @@ void Verifier::verifyMustTailCall(CallInst &CI) {
35803580
AttributeList CallerAttrs = F->getAttributes();
35813581
AttributeList CalleeAttrs = CI.getAttributes();
35823582
if (CI.getCallingConv() == CallingConv::SwiftTail ||
3583-
CI.getCallingConv() == CallingConv::Tail) {
3583+
CI.getCallingConv() == CallingConv::Tail ||
3584+
CI.getCallingConv() == CallingConv::OCaml) {
35843585
StringRef CCName =
3585-
CI.getCallingConv() == CallingConv::Tail ? "tailcc" : "swifttailcc";
3586+
CI.getCallingConv() == CallingConv::Tail ? "tailcc" :
3587+
CI.getCallingConv() == CallingConv::SwiftTail ? "swifttailcc" : "ocamlcc";
35863588

35873589
// - Only sret, byval, swiftself, and swiftasync ABI-impacting attributes
35883590
// are allowed in swifttailcc call

0 commit comments

Comments
 (0)