File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ cannot translate into Rust:
72
72
[ the tracking issue for exceptions] ( https://github.com/rust-lang/rust-bindgen/issues/1208 )
73
73
for more details.
74
74
75
- * Return value optimization. C++ compilers will in certain circumstances optimize functions
76
- returning a struct type value to instead take an extra hidden argument that refers
77
- to the return value struct. ` bindgen ` cannot necessarily know about this optimization and
78
- thus at present ` bindgen ` -interfaces for these kinds of functions are invalid.
75
+ * Many C++ specific aspects of calling conventions. For example in the Itanium abi types that are
76
+ "[ non trivial for the purposes of calls] ( https://itanium-cxx-abi.github.io/cxx-abi/abi.html#non-trivial ) "
77
+ should be passed by pointer, even if they are otherwise eligable to be passed in a register.
78
+ Similarly in both the Itanium and MSVC ABIs such types are returned by "hidden parameter", much like
79
+ large structs in C that would not fit into a register. This also applies to types with any base classes
80
+ in the MSVC ABI (see [ x64 calling convention] ( https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#return-values ) ).
81
+ Because bindgen does not know about these rules generated interfaces using such types are currently invalid.
You can’t perform that action at this time.
0 commit comments