summaryrefslogtreecommitdiff
path: root/libbindgen/src/codegen/mod.rs
AgeCommit message (Collapse)Author
2017-01-23Unify under the `bindgen` name.Emilio Cobos Álvarez
2017-01-19Auto merge of #403 - emilio:variadic-fn, r=fitzgenbors-servo
codegen: Don't implement variadic methods. Fixes #402 r? @fitzgen
2017-01-18codegen: Don't implement variadic methods.Emilio Cobos Álvarez
Fixes #402
2017-01-13codegen: Fix use generation for non-root module.Emilio Cobos Álvarez
2017-01-13codegen: Prefer use instead of type aliases.Emilio Cobos Álvarez
2017-01-13Update aster and syntex.Emilio Cobos Álvarez
2017-01-11ir: Handle inline namespaces.Emilio Cobos Álvarez
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-11codegen: Don't make auto-opaque types without template params.Emilio Cobos Álvarez
2017-01-11Auto merge of #393 - emilio:enum-const-api, r=upsuperbors-servo
Provide an API to constify enum variants. r? @upsuper
2017-01-11ir: Support hiding enum variants.Emilio Cobos Álvarez
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-11codegen: Constify enum variants.Emilio Cobos Álvarez
2017-01-06codegen: Properly handle virtual bases.Emilio Cobos Álvarez
2017-01-06ir: Change our representation of base types so they also have a base kind.Emilio Cobos Álvarez
This still doesn't change behavior, but it's nice to split it for easier review. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2016-12-30Auto merge of #374 - fitzgen:derive-debug-with-array-too-big, r=emiliobors-servo
Derive debug with array too big See the first commit's message for details, second commit is just `rustfmt`. r? @emilio Not quite sure whether the `Opaque` struct is fully motivated... it seems like it would be useful later on in codegen, but might not be pulling its own weight without more usage...
2016-12-29Run `cargo fmt` on `libbindgen`Nick Fitzgerald
2016-12-29Do not derive Copy/Debug for some opaque typesNick Fitzgerald
When we treat a type as opaque, either because it is explicitly annotated as such or because it is a template that has a non-type parameter, we need to check if the size is larger than RUST_DERIVE_IN_ARRAY_LIMIT. Performing this check requires information that is up the stack, in the `Item` rather than in the `CompInfo` or `Type`. Therefore, I introduced two traits to encapsulate whether a thing can derive `Debug` and `Copy` (the `CanDeriveDebug` and `CanDeriveCopy` traits, respectively) and implemented them for ALL THE THINGS. This allowes us to perform our various checks at the level where we have access to the necessary info, and to let sub-levels do their own checks with their sub-info. Fixes #372.
2016-12-29Auto merge of #371 - emilio:pointer, r=fitzgenbors-servo
codegen: Use the canonical type to determine whether we should conver… …t to a pointer an argument. Fixes https://github.com/Yamakaky/rust-bindgen/issues/407 r? @fitzgen
2016-12-29codegen: Use the canonical type to determine whether we should convert to a ↵Emilio Cobos Álvarez
pointer an argument. Fixes https://github.com/Yamakaky/rust-bindgen/issues/407
2016-12-29Replace all non-fatal `error!`s with `warn!`sTetsuharu OHZEKI
2016-12-23libbindgen: run `cargo fmt`.Emilio Cobos Álvarez
2016-12-23ir: Be more resistent to failure when parsing enums.Emilio Cobos Álvarez
2016-12-23codegen: Use the canonical type to generate function signatures.Emilio Cobos Álvarez
2016-12-22Auto merge of #354 - Nashenas88:master, r=emiliobors-servo
Followed Resolved Type Ref instead of panicking This could fix #353, but I would really want everyone to review in case I'm missing something important. The compilation continues for the code I'm working with. Also, should I add a regression test for this? I could simply use the code in the referenced issue.
2016-12-21Run `cargo fmt` on the sourcesNick Fitzgerald
2016-12-21Followed Resolved Type Ref instead of panickingPaul Faria
2016-12-15codegen: Properly mangle nested anonymous enums with duplicated variants.Emilio Cobos Álvarez
2016-12-15codegen: Properly mangle method names.Emilio Cobos Álvarez
2016-12-13codegen: Rename the temporary variable in constructors for __bindgen_tmp, to ↵Emilio Cobos Álvarez
avoid potential conflicts.
2016-12-13Add support for constructors, and integration tests.Emilio Cobos Álvarez
2016-12-09Remove macro_rules in codegenXidorn Quan
2016-12-07codegen: generate stable names for tests functions.Emilio Cobos Álvarez
2016-12-07ir: Saner whitelisting/blacklisting.Emilio Cobos Álvarez
2016-12-07Auto merge of #319 - emilio:union-in-ns, r=fitzgenbors-servo
codegen: Fix bindgen-injected items in namespaces. Found while trying to use namespaces in stylo. r? @fitzgen
2016-12-06Add an API to decide what gets generated more granularly.Emilio Cobos Álvarez
2016-12-05codegen: Fix bindgen-injected items in namespaces.Emilio Cobos Álvarez
Found while trying to use namespaces in stylo.
2016-12-02Use the generated root module via a relative pathNick Fitzgerald
We previously generated uses of the root module with absolute paths: use root; However this only works if the generated bindings are the root of the crate. If they were in some submodule then that path would not be valid. They are now generated relative to the current module, like this: use self::super::super::root; Fixes #96
2016-11-22ir: Rework how we discover children of modules.Emilio Cobos Álvarez
2016-11-22codegen: Don't bother generating an empty module.Emilio Cobos Álvarez
2016-11-22A more coherent story for whitelisting.Emilio Cobos Álvarez
2016-11-21Auto merge of #282 - impowski:layout_template_specializations, r=emiliobors-servo
First steps to fix issue #57 This should generate tests for fully specialized templates. TODO: - [x] Tests r? @emilio
2016-11-21Apply fixes due code review for issue #57Artem Biryukov
2016-11-21Reformat.Emilio Cobos Álvarez
2016-11-21codegen: Fix whitelisting inside namespaces.Emilio Cobos Álvarez
2016-11-20Add new expectations for testsArtem Biryukov
2016-11-20Take out template arguments and make unique namesArtem Biryukov
2016-11-20First steps to fix issue #57Artem Biryukov
2016-11-18codegen: Properly mangle bitfield getters.Emilio Cobos Álvarez
2016-11-17ir: Avoid generating out-of-range values in constants.Emilio Cobos Álvarez
Fixes #274
2016-11-17Generate bool value for bool constantsXidorn Quan
This fixes #272.
2016-11-16Multiple constant generation evaluation improvements.Emilio Cobos Álvarez