Skip to content

Commit dd7f49d

Browse files
committed
[cxx-interop] Use call, not function type for attributes.
Otherwise, attrs on the return (pass by val) will get applied to the call, which will trigger a verifier error.
1 parent ed88700 commit dd7f49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2917,7 +2917,7 @@ llvm::CallInst *IRBuilder::CreateCall(const FunctionPointer &fn,
29172917
llvm::CallInst *call =
29182918
IRBuilderBase::CreateCall(fnTy, fn.getRawPointer(), args, bundles);
29192919
call->setAttributes(
2920-
fixUpTypesInByValAndStructRetAttributes(fnTy, fn.getAttributes()));
2920+
fixUpTypesInByValAndStructRetAttributes(fnTy, call->getAttributes()));
29212921
call->setCallingConv(fn.getCallingConv());
29222922
return call;
29232923
}

0 commit comments

Comments
 (0)