summaryrefslogtreecommitdiff
path: root/libbindgen/src/ir
AgeCommit message (Collapse)Author
2017-01-23Unify under the `bindgen` name.Emilio Cobos Álvarez
2017-01-22Auto merge of #413 - emilio:debug-array-unaligned, r=fitzgenbors-servo
codegen: Avoid generating invalid Rust code when a struct is not properly aligned. r? @fitzgen cc #412
2017-01-21codegen: Avoid generating invalid Rust code when a struct is not properly ↵Emilio Cobos Álvarez
aligned.
2017-01-19Auto merge of #401 - emilio:function-checks, r=fitzgenbors-servo
ir: Unify function checks so they apply to non-methods. Fixes #399 r? @fitzgen
2017-01-19Auto merge of #397 - emilio:trace-vars, r=fitzgenbors-servo
ir: Trace types across vars. r? @fitzgen
2017-01-19ir: Fix the assert no danging items traversal to avoid getting hung on a ↵Emilio Cobos Álvarez
cyclic reference caused by inner_const.hpp.
2017-01-16ir: Unify function checks so they apply to non-methods.Emilio Cobos Álvarez
2017-01-15ir: Trace types across vars.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-11ir: Trace through some types while collecting automatically.Emilio Cobos Álvarez
This makes sense because there's no special meaning for some of them to be opaque.
2017-01-11ir: Define a set of items we want to collect types through unconditionally.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-10Auto merge of #383 - emilio:virtual-base, r=fitzgenbors-servo
Tidy up and test virtual inheritance handling. Done while investigating #380. r? @fitzgen
2017-01-10ir: Parse whether we should constify an enum variant.Emilio Cobos Álvarez
2017-01-10ir: Add an annotation API to constify enum variants.Emilio Cobos Álvarez
2017-01-10ir: Add a helper to the context to access the user-provided type chooser.Emilio Cobos Álvarez
2017-01-09ir: Evaluate constant strings too.Emilio Cobos Álvarez
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
2017-01-06codegen: Properly handle virtual bases.Emilio Cobos Álvarez
2017-01-06ir: More appropriately track whether we're inheriting virtually.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>
2017-01-05Allow regexps for --blacklist_type and --opaque_typeJeremy Fitzhardinge
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-30Relax opaque layout trait deriving and take alignment into accountNick Fitzgerald
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-29Replace all non-fatal `error!`s with `warn!`sTetsuharu OHZEKI
2016-12-28ir: More generic handling of non-deductible auto types.Emilio Cobos Álvarez
2016-12-28ir: Skip function template earlier.Xidorn Quan
This should fix #364.
2016-12-23ir: Don't assume that base classes are already resolved.Emilio Cobos Álvarez
Fixes #359
2016-12-23ir: Don't parse default template parameter types.Emilio Cobos Álvarez
It's a bunch of complexity we don't use nor need.
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-21Run `cargo fmt` on the sourcesNick Fitzgerald
2016-12-21ir: Handle CXType_Auto.Emilio Cobos Álvarez
2016-12-15Wrap Type into OptionArtem Biryukov
2016-12-15Auto merge of #346 - emilio:fix-dtors, r=fitzgenbors-servo
codegen: Properly mangle nested anonymous enums with duplicated variants. r? @fitzgen
2016-12-15ir: Do the proper thing for methods.Emilio Cobos Álvarez
2016-12-15ir: Don't parse constructors twice.Emilio Cobos Álvarez
2016-12-15Auto merge of #345 - fitzgen:use-feature-for-dangling-item-asserts, r=emiliobors-servo
Use a feature to control dangling item assertions These checks are expensive enough that we only want to do them when hacking on bindgen itself, not anytime someone does a debug build of something that depends on bindgen. r? @emilio
2016-12-15Use a feature to control dangling item assertionsNick Fitzgerald
These checks are expensive enough that we only want to do them when hacking on bindgen itself, not anytime someone does a debug build of something that depends on bindgen.
2016-12-15Auto merge of #344 - emilio:fix-dtors, r=fitzgenbors-servo
Properly mangle method names, don't generate destructors. r? @fitzgen Fixes a few issues seen in #342
2016-12-15Add assertion for dangling referencesArtem Biryukov
2016-12-15ir: Don't parse standalone destructors.Emilio Cobos Álvarez
2016-12-14Use a dynamically loaded clang to do as much as we can with old clang ↵Emilio Cobos Álvarez
versions, and experiment with new ones. It's a pity that we don't support clang 3.7 and similar for generating C bindings, when it should be straight-forward. This should allow us to support older clang versions, and also experiment with pre-release clang APIs if needed. This depends on: https://github.com/KyleMayes/clang-sys/pull/44
2016-12-13Silence the 'Unhandled cursor kind' warning for toplevel operator overloads ↵Vladimir Vukicevic
and using directives
2016-12-13Auto merge of #333 - emilio:clang-sys, r=fitzgenbors-servo
Use clang-sys bindings instead of ours. I plan to use a dynamically loaded clang-sys library to remove the llvm-stable feature. This is part of the work. r? @fitzgen