summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-10-24 16:12:36 -0500
committerGitHub <noreply@github.com>2016-10-24 16:12:36 -0500
commit25e45dbb6c254929c690129c692a7ef77c1cec2b (patch)
tree63677288cd5b498f6bb061fc0266d7efc103514f
parentcbb940a426115d763f4caf831056b3acedac5f57 (diff)
parent364a2d46f4439d341909376f68aa89ad5bf8ac83 (diff)
Auto merge of #117 - fitzgen:remove-unused-override-enum-ty-option, r=emilio
Remove unused override enum ty option r? @emilio
-rw-r--r--bindgen_plugin/src/bgmacro.rs1
-rwxr-xr-xsrc/bin/bindgen.rs10
-rwxr-xr-xsrc/lib.rs30
-rw-r--r--tests/headers/class_with_typedef.hpp1
-rw-r--r--tests/headers/crtp.hpp2
-rw-r--r--tests/headers/vtable_recursive_sig.hpp2
6 files changed, 1 insertions, 45 deletions
diff --git a/bindgen_plugin/src/bgmacro.rs b/bindgen_plugin/src/bgmacro.rs
index 30ebaaea..0e95b9a5 100644
--- a/bindgen_plugin/src/bgmacro.rs
+++ b/bindgen_plugin/src/bgmacro.rs
@@ -101,7 +101,6 @@ impl MacroArgsVisitor for BindgenArgsVisitor {
Some("link_framework") => self.options.links.push((val.to_string(), LinkType::Framework)),
Some("match") => self.options.match_pat.push(val.to_string()),
Some("clang_args") => self.options.clang_args.push(val.to_string()),
- Some("enum_type") => self.options.override_enum_ty = val.to_string(),
_ => return false
}
true
diff --git a/src/bin/bindgen.rs b/src/bin/bindgen.rs
index cb84f09b..183257c8 100755
--- a/src/bin/bindgen.rs
+++ b/src/bin/bindgen.rs
@@ -58,8 +58,6 @@ Options:
--enable-cxx-namespaces Enable support for C++ namespaces.
- --no-type-renaming Don't rename types.
-
--emit-clang-ast Output the ast (for debugging purposes)
--use-msvc-mangling Handle MSVC C++ ABI mangling; requires that
@@ -69,8 +67,6 @@ Options:
--no-unstable-rust Avoid generating unstable rust.
- --no-bitfield-methods Avoid generating methods for bitfield access.
-
--opaque-type=<type> Mark a type as opaque.
--blacklist-type=<type> Mark a type as hidden.
@@ -162,18 +158,12 @@ fn parse_args_or_exit(args: Vec<String>) -> (BindgenOptions, Box<io::Write>) {
"--ignore-functions" => {
options.ignore_functions = true;
}
- "--no-bitfield-methods" => {
- options.gen_bitfield_methods = false;
- }
"--ignore-methods" => {
options.ignore_methods = true;
}
"--enable-cxx-namespaces" => {
options.enable_cxx_namespaces = true;
}
- "--no-type-renaming" => {
- options.rename_types = false;
- }
"--no-unstable-rust" => {
options.unstable_rust = false;
}
diff --git a/src/lib.rs b/src/lib.rs
index 5d177771..4464db65 100755
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -114,29 +114,10 @@ impl Builder {
self
}
- pub fn no_bitfield_methods(mut self) -> Builder {
- self.options.gen_bitfield_methods = false;
- self
- }
-
pub fn no_unstable_rust(mut self) -> Builder {
self.options.unstable_rust = false;
self
}
- pub fn rust_enums(mut self, value: bool) -> Builder {
- self.options.rust_enums = value;
- self
- }
-
- pub fn rename_types(mut self, value: bool) -> Builder {
- self.options.rename_types = value;
- self
- }
-
- pub fn disable_class_constants(mut self) -> Builder {
- self.options.class_constants = false;
- self
- }
pub fn generate(self) -> Result<Bindings, ()> {
Bindings::generate(self.options, None)
@@ -152,24 +133,18 @@ pub struct BindgenOptions {
pub whitelisted_functions: RegexSet,
pub whitelisted_vars: RegexSet,
pub builtins: bool,
- pub rust_enums: bool,
pub links: Vec<(String, LinkType)>,
pub emit_ast: bool,
pub ignore_functions: bool,
pub ignore_methods: bool,
- pub gen_bitfield_methods: bool,
pub enable_cxx_namespaces: bool,
- pub rename_types: bool,
pub derive_debug: bool,
/// Generate or not only stable rust.
pub unstable_rust: bool,
- /// Whether to generate C++ class constants.
- pub class_constants: bool,
/// Wether to generate names that are **directly** under namespaces.
pub namespaced_constants: bool,
/// Whether to use msvc mangling rules
pub msvc_mangling: bool,
- pub override_enum_ty: String,
pub raw_lines: Vec<String>,
pub clang_args: Vec<String>,
}
@@ -183,18 +158,13 @@ impl Default for BindgenOptions {
whitelisted_functions: Default::default(),
whitelisted_vars: Default::default(),
builtins: false,
- rust_enums: true,
links: vec![],
emit_ast: false,
ignore_functions: false,
ignore_methods: false,
- gen_bitfield_methods: true,
- rename_types: true,
derive_debug: true,
enable_cxx_namespaces: false,
- override_enum_ty: "".to_string(),
unstable_rust: true,
- class_constants: true,
namespaced_constants: true,
msvc_mangling: false,
raw_lines: vec![],
diff --git a/tests/headers/class_with_typedef.hpp b/tests/headers/class_with_typedef.hpp
index 41a3cfd7..8e09e8db 100644
--- a/tests/headers/class_with_typedef.hpp
+++ b/tests/headers/class_with_typedef.hpp
@@ -1,4 +1,3 @@
-// bindgen-flags: --no-type-renaming
// bindgen-features: llvm_stable
typedef int AnotherInt;
diff --git a/tests/headers/crtp.hpp b/tests/headers/crtp.hpp
index 1f799b3d..a5477c54 100644
--- a/tests/headers/crtp.hpp
+++ b/tests/headers/crtp.hpp
@@ -1,5 +1,3 @@
-// bindgen-flags: --no-type-renaming
-
template<class T>
class Base {};
diff --git a/tests/headers/vtable_recursive_sig.hpp b/tests/headers/vtable_recursive_sig.hpp
index 1556f866..8729be00 100644
--- a/tests/headers/vtable_recursive_sig.hpp
+++ b/tests/headers/vtable_recursive_sig.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: --no-type-renaming -- -std=c++11
+// bindgen-flags: -- -std=c++11
class Derived;
class Base {