We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cb337a commit 20222bbCopy full SHA for 20222bb
lib/IRGen/GenCall.cpp
@@ -1924,6 +1924,9 @@ class SyncCallEmission final : public CallEmission {
1924
// This can happen when calling C functions, or class method dispatch thunks
1925
// for methods that have covariant ABI-compatible overrides.
1926
auto expectedNativeResultType = nativeSchema.getExpandedType(IGF.IGM);
1927
+ // If the expected result type is void, bail.
1928
+ if (expectedNativeResultType->isVoidTy())
1929
+ return;
1930
if (result->getType() != expectedNativeResultType) {
1931
result =
1932
IGF.coerceValue(result, expectedNativeResultType, IGF.IGM.DataLayout);
0 commit comments