Skip to content

Commit

Permalink
Thunks: Build fix for clang versions older than 15
Browse files Browse the repository at this point in the history
Returning incomplete types from deleted functions is valid C++, but clang
did not support it until version 15:
llvm/llvm-project#52802
  • Loading branch information
neobrain committed Dec 22, 2023
1 parent ccf19ed commit 35d9056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ThunkLibs/Generator/gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void GenerateThunkLibsAction::EmitLayoutWrappers(
// Disallow use of layout wrappers for this type by specializing without a definition
fmt::print(file, "template<>\nstruct guest_layout<{}>;\n", struct_name);
fmt::print(file, "template<>\nstruct host_layout<{}>;\n", struct_name);
fmt::print(file, "guest_layout<{}> to_guest(const host_layout<{}>&) = delete;\n", struct_name, struct_name);
fmt::print(file, "guest_layout<{}>& to_guest(const host_layout<{}>&) = delete;\n", struct_name, struct_name);
continue;
}

Expand Down

0 comments on commit 35d9056

Please sign in to comment.