summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
AgeCommit message (Collapse)Author
2018-09-19Teach the float code about u128.Emilio Cobos Álvarez
2018-09-19Teach the blob code to generate i128 / u128 if available.Emilio Cobos Álvarez
This is very mechanical and boring, but needed.
2018-09-19codegen: Generate u128 / i128 when available.Emilio Cobos Álvarez
2018-09-14Fix typo: s/unkown/unknown/ (missing 'n')Daniel Holbert
2018-09-10generate type alias for the `block` typeFlier Lu
2018-08-28Debug implementation: use core if selectedchrysn
Contributes-To: https://github.com/rust-lang-nursery/rust-bindgen/issues/1100
2018-08-24Don't generate a __bindgen_align field if we support repr(align).Emilio Cobos Álvarez
2018-08-19Not gnereate binding for variadic function with ms_abiJean-Philippe Dufraigne
rustc fail to compile variadic function with ms_abi: error[E0045]: variadic function must have C or cdecl calling convention As suggested in issue, this short term fix: not generate binding and emit a warning. Fixes #997
2018-08-14Auto merge of #1366 - gnzlbg:vec, r=emiliov0.38.0bors-servo
Map vector types to arrays and pass them by value This PR maps vector types to arrays and passes them by value (that is, they are passed to C as `[T; N]`. This already allows defining them as a blacklisted opaque type, such that the user can provide its own definition from e.g. `std::arch`. A subsequent PR should map vector types to unit structs with a private member: ```rust #[repr(align(16))] pub struct __m128([f32; 4]); ``` to make their alignment at least be correct. This should allow transmuting `std::arch` types to these types properly. Once that is done, we probably want to detect the canonical vector types (e.g. `__m128`) and pull in the type from `std`/`core`::arch instead.
2018-08-14address review commentsgnzlbg
2018-08-14Minor stylistic nits after #1362.Emilio Cobos Álvarez
2018-08-14address commentsSébastien Duquette
2018-08-14Convert CodegenOptions to a bitfield.Sébastien Duquette
2018-08-14map vector types to arrays and pass them by valuegnzlbg
2018-07-30Minor cleanup after #1355.Emilio Cobos Álvarez
2018-07-29Use associated constants for rust enums when availableJosh Hejna
2018-07-05ir: Don't assume wchar is 2 bytes.Emilio Cobos Álvarez
Fixes #1345
2018-06-13Fix typos.Bruce Mitchener
2018-06-04add --constified-enum to output consts when the default is changedDaniel Brooks
2018-06-04remove unnecessary as_refDaniel Brooks
2018-06-04Rename from "enum variant" to "enum style"Daniel Brooks
2018-06-03Add an option to set the default codegen style for all enumsDaniel Brooks
2018-05-16Handle pointer constness at the right level.Emilio Cobos Álvarez
2018-05-03codegen: Actually honor the new option for module_lines.Emilio Cobos Álvarez
Only when modules are enabled of course.
2018-04-08TemplateParameters.used_template_params doesn't return OptionTamir Duberstein
2018-04-08TemplateParameters.all_template_params doesn't return OptionTamir Duberstein
2018-04-08TemplateParameters.self_template_params doesn't return OptionTamir Duberstein
2018-04-07Auto merge of #1303 - Eijebong:bump, r=emiliobors-servo
Bump quote to 0.5
2018-04-07Auto merge of #1293 - strake:use_associated_consts, r=emiliobors-servo
optionally use associated constants in bitfields See #1166 r? @emilio
2018-04-06not generate associated constants to unnamed typesM Farkas-Dyck
2018-04-04Bump quote to 0.5 and proc_macro2 to 0.3Bastien Orivel
2018-04-03Revert "Revert "Bump quote to 0.4""Bastien Orivel
This reverts commit eb415c7a7cf8c72664dbfda5a614474cda5c185c.
2018-04-03codegen: Don't skip alignment checks if we support repr align.Emilio Cobos Álvarez
Plus fix the check that avoids us generating explicit alignment fields for structs aligned to more than pointer-size. Fixes #1291
2018-04-03codegen: Use target pointer size consistently for layout calculations.Emilio Cobos Álvarez
Closes #1284
2018-04-01feature guard rather than optionM Farkas-Dyck
2018-04-01optionally use associated constants in bitfieldsM Farkas-Dyck
2018-03-17Handle bitfield enum pattern aliasingTravis Finkenauer
The previous fix for issue #1198 was incomplete.
2018-03-13Auto merge of #1272 - tmfink:issue-1198, r=emiliobors-servo
Declare precedence on enum types Fixes issue #1198 where an enum matches the pattern for multiple enum types, such as constified module enum AND rustified enum. Documents precedence in `Builder` doc comment.
2018-03-13Add a kill-switch for untagged unions.Emilio Cobos Álvarez
Otherwise we can't use repr(align) on stylo.
2018-03-13codegen: support repr(align).Emilio Cobos Álvarez
Fixes #917
2018-03-11Fix bug when enum matched multiple typesTravis Finkenauer
If an enum matched a pattern for rustified enum and constified module enum, then rust code would fail to compile with "ambiguous associated type" error. We fix the error by giving constified module enum "higher precedence". Fixes issue #1198
2018-03-04codegen: Avoid &String.Emilio Cobos Álvarez
2018-02-14Revert "Bump quote to 0.4"Nick Fitzgerald
This reverts commit 6899c275ee0ab0687ec66c490ddd1a76f8223513. The `proc_macro2` crate depends on rustc internal crates, which means that `bindgen` would need to be run under `rustup`. We can follow https://github.com/rust-lang/rust/issues/47931 to get updates on when this issue might be resolved and we can update `quote` again. Fixes #1248
2018-02-12codegen: Expose variant comments.Emilio Cobos Álvarez
2018-01-29Auto merge of #1241 - emilio:fwd-decl-no-fun, r=fitzgenbors-servo
codegen: Make forward declarations go through the more generic path. Instead of special-casing. This allows to use the normal flags to control what can be or not derived for them. Arguably deriving Copy / Clone is kind of busted for those, but changing this by default broke tests (RefPtr<ForwardDeclaredType> stopped working for example). So I think this is a good compromise. Fixes #1238
2018-01-29Auto merge of #1240 - emilio:virtual-dtor-fix, r=fitzgenbors-servo
ir: Choose the right mangling for destructors on all codepaths. Fixes #1133.
2018-01-29codegen: Make forward declarations go through the more generic path.Emilio Cobos Álvarez
Instead of special-casing. This allows to use the normal flags to control what can be or not derived for them. Arguably deriving Copy / Clone is kind of busted for those, but changing this by default broke tests (RefPtr<ForwardDeclaredType> stopped working for example). So I think this is a good compromise. Fixes #1238
2018-01-29ir: Choose the right mangling for destructors on all codepaths.Emilio Cobos Álvarez
Fixes #1133.
2018-01-29codegen: Make the cyclic typedef name detection catch more cases.Emilio Cobos Álvarez
By looking through typedefs, we also catch more complex cases like the ones that appear on Android's stdlib. Fixes #946
2018-01-23Bump quote to 0.4Bastien Orivel