summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiran Ringel <liranringel@gmail.com>2017-10-07 12:12:19 +0200
committerLiran Ringel <liranringel@gmail.com>2017-10-07 15:02:08 +0200
commitf2b30c8b07959bf92b161157ba200b7ec301271f (patch)
tree3ce751af7d67a72aafbf680ce9d9f30c108ef835
parentc7fe6b67fa71f7a7a5d8534aa608865a987c1e94 (diff)
Tell LLVM to not mangle names if they're already mangled through link_name attribute
-rw-r--r--src/codegen/helpers.rs3
-rw-r--r--src/ir/context.rs18
-rw-r--r--src/ir/function.rs22
-rw-r--r--tests/expectations/tests/arg_keyword.rs2
-rw-r--r--tests/expectations/tests/bitfield-method-same-name.rs6
-rw-r--r--tests/expectations/tests/bitfield_large_overflow.rs2
-rw-r--r--tests/expectations/tests/canonical_path_without_namespacing.rs2
-rw-r--r--tests/expectations/tests/class.rs8
-rw-r--r--tests/expectations/tests/class_1_0.rs8
-rw-r--r--tests/expectations/tests/class_nested.rs4
-rw-r--r--tests/expectations/tests/class_static.rs6
-rw-r--r--tests/expectations/tests/class_with_typedef.rs8
-rw-r--r--tests/expectations/tests/complex_global.rs6
-rw-r--r--tests/expectations/tests/constify-module-enums-types.rs8
-rw-r--r--tests/expectations/tests/constructor-tp.rs2
-rw-r--r--tests/expectations/tests/constructors.rs6
-rw-r--r--tests/expectations/tests/decl_extern_int_twice.rs2
-rw-r--r--tests/expectations/tests/decl_ptr_to_array.rs2
-rw-r--r--tests/expectations/tests/default-template-parameter.rs2
-rw-r--r--tests/expectations/tests/derive-bitfield-method-same-name.rs6
-rw-r--r--tests/expectations/tests/elaborated.rs2
-rw-r--r--tests/expectations/tests/enum_and_vtable_mangling.rs2
-rw-r--r--tests/expectations/tests/forward_declared_complex_types.rs6
-rw-r--r--tests/expectations/tests/forward_declared_complex_types_1_0.rs6
-rw-r--r--tests/expectations/tests/func_ptr.rs2
-rw-r--r--tests/expectations/tests/gen-constructors.rs2
-rw-r--r--tests/expectations/tests/gen-destructors.rs2
-rw-r--r--tests/expectations/tests/generate-inline.rs4
-rw-r--r--tests/expectations/tests/inner_const.rs4
-rw-r--r--tests/expectations/tests/issue-410.rs2
-rw-r--r--tests/expectations/tests/issue-447.rs2
-rw-r--r--tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs2
-rw-r--r--tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs2
-rw-r--r--tests/expectations/tests/issue-801-opaque-sloppiness.rs2
-rw-r--r--tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs6
-rw-r--r--tests/expectations/tests/issue-888-enum-var-decl-jump.rs2
-rw-r--r--tests/expectations/tests/keywords.rs98
-rw-r--r--tests/expectations/tests/libclang-3.8/auto.rs4
-rw-r--r--tests/expectations/tests/libclang-3.8/call-conv-field.rs2
-rw-r--r--tests/expectations/tests/libclang-3.8/const_bool.rs6
-rw-r--r--tests/expectations/tests/libclang-3.8/constant-evaluate.rs14
-rw-r--r--tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs4
-rw-r--r--tests/expectations/tests/libclang-3.9/auto.rs2
-rw-r--r--tests/expectations/tests/libclang-3.9/call-conv-field.rs2
-rw-r--r--tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs2
-rw-r--r--tests/expectations/tests/libclang-4/auto.rs2
-rw-r--r--tests/expectations/tests/libclang-4/call-conv-field.rs2
-rw-r--r--tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs2
-rw-r--r--tests/expectations/tests/mangling-ios.rs1
-rw-r--r--tests/expectations/tests/mangling-linux32.rs2
-rw-r--r--tests/expectations/tests/mangling-linux64.rs2
-rw-r--r--tests/expectations/tests/mangling-macos.rs3
-rw-r--r--tests/expectations/tests/mangling-win32.rs1
-rw-r--r--tests/expectations/tests/mangling-win64.rs2
-rw-r--r--tests/expectations/tests/method-mangling.rs2
-rw-r--r--tests/expectations/tests/namespace.rs14
-rw-r--r--tests/expectations/tests/nested_vtable.rs2
-rw-r--r--tests/expectations/tests/objc_class.rs2
-rw-r--r--tests/expectations/tests/objc_interface_type.rs2
-rw-r--r--tests/expectations/tests/objc_sel_and_id.rs4
-rw-r--r--tests/expectations/tests/opaque-tracing.rs2
-rw-r--r--tests/expectations/tests/overloading.rs8
-rw-r--r--tests/expectations/tests/public-dtor.rs2
-rw-r--r--tests/expectations/tests/ref_argument_array.rs2
-rw-r--r--tests/expectations/tests/template.rs2
-rw-r--r--tests/expectations/tests/test_multiple_header_calls_in_builder.rs2
-rw-r--r--tests/expectations/tests/union_dtor.rs2
-rw-r--r--tests/expectations/tests/union_dtor_1_0.rs2
-rw-r--r--tests/expectations/tests/use-core.rs2
-rw-r--r--tests/expectations/tests/use-core_1_0.rs2
-rw-r--r--tests/expectations/tests/var-tracing.rs4
-rw-r--r--tests/expectations/tests/variadic-method.rs4
-rw-r--r--tests/expectations/tests/virtual_dtor.rs2
-rw-r--r--tests/expectations/tests/virtual_overloaded.rs4
-rw-r--r--tests/expectations/tests/vtable_recursive_sig.rs2
75 files changed, 179 insertions, 211 deletions
diff --git a/src/codegen/helpers.rs b/src/codegen/helpers.rs
index 5136d787..9a8b0576 100644
--- a/src/codegen/helpers.rs
+++ b/src/codegen/helpers.rs
@@ -45,6 +45,9 @@ pub mod attributes {
}
pub fn link_name(name: &str) -> quote::Tokens {
+ // LLVM mangles the name by default but it's already mangled.
+ // Prefixing the name with \u{1} should tell LLVM to not mangle it.
+ let name = format!("\u{1}{}", name);
quote! {
#[link_name = #name]
}
diff --git a/src/ir/context.rs b/src/ir/context.rs
index 8f361094..c84e66ca 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -391,9 +391,6 @@ pub struct BindgenContext {
/// bitfield allocation units computed. Drained in `compute_bitfield_units`.
need_bitfield_allocation: Vec<ItemId>,
- /// Whether we need the mangling hack which removes the prefixing underscore.
- needs_mangling_hack: bool,
-
/// The set of (`ItemId`s of) types that can't derive debug.
///
/// This is populated when we enter codegen by `compute_cannot_derive_debug`
@@ -558,15 +555,6 @@ impl BindgenContext {
).expect("TranslationUnit::parse failed")
};
- // Mac os, iOS and Win32 need __ for mangled symbols but rust will
- // automatically prepend the extra _.
- //
- // We need to make sure that we don't include __ because rust will turn
- // into ___.
- let needs_mangling_hack = effective_target.contains("darwin") ||
- effective_target.contains("ios") ||
- effective_target == "i686-pc-win32";
-
let root_module = Self::build_root_module(ItemId(0));
let root_module_id = root_module.id().as_module_id_unchecked();
@@ -592,7 +580,6 @@ impl BindgenContext {
codegen_items: None,
used_template_parameters: None,
need_bitfield_allocation: Default::default(),
- needs_mangling_hack: needs_mangling_hack,
cannot_derive_debug: None,
cannot_derive_default: None,
cannot_derive_copy: None,
@@ -1415,11 +1402,6 @@ impl BindgenContext {
Item::new(id, None, None, id, ItemKind::Module(module))
}
- /// Returns the target triple bindgen is running over.
- pub fn needs_mangling_hack(&self) -> bool {
- self.needs_mangling_hack
- }
-
/// Get the root module.
pub fn root_module(&self) -> ModuleId {
self.root_module
diff --git a/src/ir/function.rs b/src/ir/function.rs
index 3a9f337c..b637f9f1 100644
--- a/src/ir/function.rs
+++ b/src/ir/function.rs
@@ -206,23 +206,6 @@ fn get_abi(cc: CXCallingConv) -> Abi {
}
}
-fn mangling_hack_if_needed(ctx: &BindgenContext, symbol: &mut String) {
- if ctx.needs_mangling_hack() {
- match symbol.chars().next().unwrap() {
- // Stripping leading underscore for all names on Darwin and
- // C linkage functions on Win32.
- '_' => {
- symbol.remove(0);
- }
- // Stop Rust from prepending underscore for variables on Win32.
- '?' => {
- symbol.insert(0, '\x01');
- }
- _ => {}
- }
- }
-}
-
/// Get the mangled name for the cursor's referent.
pub fn cursor_mangling(
ctx: &BindgenContext,
@@ -241,8 +224,7 @@ pub fn cursor_mangling(
}
if let Ok(mut manglings) = cursor.cxx_manglings() {
- if let Some(mut m) = manglings.pop() {
- mangling_hack_if_needed(ctx, &mut m);
+ if let Some(m) = manglings.pop() {
return Some(m);
}
}
@@ -252,8 +234,6 @@ pub fn cursor_mangling(
return None;
}
- mangling_hack_if_needed(ctx, &mut mangling);
-
if cursor.kind() == clang_sys::CXCursor_Destructor {
// With old (3.8-) libclang versions, and the Itanium ABI, clang returns
// the "destructor group 0" symbol, which means that it'll try to free
diff --git a/tests/expectations/tests/arg_keyword.rs b/tests/expectations/tests/arg_keyword.rs
index 8406eaab..54c036d8 100644
--- a/tests/expectations/tests/arg_keyword.rs
+++ b/tests/expectations/tests/arg_keyword.rs
@@ -5,6 +5,6 @@
extern "C" {
- #[link_name = "_Z3fooPKc"]
+ #[link_name = "\u{1}_Z3fooPKc"]
pub fn foo(type_: *const ::std::os::raw::c_char);
}
diff --git a/tests/expectations/tests/bitfield-method-same-name.rs b/tests/expectations/tests/bitfield-method-same-name.rs
index be55ce38..7ddeb700 100644
--- a/tests/expectations/tests/bitfield-method-same-name.rs
+++ b/tests/expectations/tests/bitfield-method-same-name.rs
@@ -24,15 +24,15 @@ fn bindgen_test_layout_Foo() {
);
}
extern "C" {
- #[link_name = "_ZN3Foo4typeEv"]
+ #[link_name = "\u{1}_ZN3Foo4typeEv"]
pub fn Foo_type(this: *mut Foo) -> ::std::os::raw::c_char;
}
extern "C" {
- #[link_name = "_ZN3Foo9set_type_Ec"]
+ #[link_name = "\u{1}_ZN3Foo9set_type_Ec"]
pub fn Foo_set_type_(this: *mut Foo, c: ::std::os::raw::c_char);
}
extern "C" {
- #[link_name = "_ZN3Foo8set_typeEc"]
+ #[link_name = "\u{1}_ZN3Foo8set_typeEc"]
pub fn Foo_set_type(this: *mut Foo, c: ::std::os::raw::c_char);
}
impl Clone for Foo {
diff --git a/tests/expectations/tests/bitfield_large_overflow.rs b/tests/expectations/tests/bitfield_large_overflow.rs
index fb2029ea..ee8a4449 100644
--- a/tests/expectations/tests/bitfield_large_overflow.rs
+++ b/tests/expectations/tests/bitfield_large_overflow.rs
@@ -28,6 +28,6 @@ impl Clone for _bindgen_ty_1 {
}
}
extern "C" {
- #[link_name = "a"]
+ #[link_name = "\u{1}a"]
pub static mut a: _bindgen_ty_1;
}
diff --git a/tests/expectations/tests/canonical_path_without_namespacing.rs b/tests/expectations/tests/canonical_path_without_namespacing.rs
index d518a153..8272aebc 100644
--- a/tests/expectations/tests/canonical_path_without_namespacing.rs
+++ b/tests/expectations/tests/canonical_path_without_namespacing.rs
@@ -20,6 +20,6 @@ impl Clone for Bar {
fn clone(&self) -> Self { *self }
}
extern "C" {
- #[link_name = "_Z3bazPN3foo3BarE"]
+ #[link_name = "\u{1}_Z3bazPN3foo3BarE"]
pub fn baz(arg1: *mut Bar);
}
diff --git a/tests/expectations/tests/class.rs b/tests/expectations/tests/class.rs
index d1216655..d7ee8b52 100644
--- a/tests/expectations/tests/class.rs
+++ b/tests/expectations/tests/class.rs
@@ -245,23 +245,23 @@ fn bindgen_test_layout_RealAbstractionWithTonsOfMethods() {
RealAbstractionWithTonsOfMethods ) ));
}
extern "C" {
- #[link_name = "_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
+ #[link_name = "\u{1}_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
pub fn RealAbstractionWithTonsOfMethods_bar(this:
*const RealAbstractionWithTonsOfMethods);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3barEv"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEv"]
pub fn RealAbstractionWithTonsOfMethods_bar1(this:
*mut RealAbstractionWithTonsOfMethods);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3barEi"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEi"]
pub fn RealAbstractionWithTonsOfMethods_bar2(this:
*mut RealAbstractionWithTonsOfMethods,
foo: ::std::os::raw::c_int);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3staEv"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3staEv"]
pub fn RealAbstractionWithTonsOfMethods_sta();
}
impl Clone for RealAbstractionWithTonsOfMethods {
diff --git a/tests/expectations/tests/class_1_0.rs b/tests/expectations/tests/class_1_0.rs
index 669b7364..1127c88b 100644
--- a/tests/expectations/tests/class_1_0.rs
+++ b/tests/expectations/tests/class_1_0.rs
@@ -395,22 +395,22 @@ fn bindgen_test_layout_RealAbstractionWithTonsOfMethods() {
);
}
extern "C" {
- #[link_name = "_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
+ #[link_name = "\u{1}_ZNK32RealAbstractionWithTonsOfMethods3barEv"]
pub fn RealAbstractionWithTonsOfMethods_bar(this: *const RealAbstractionWithTonsOfMethods);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3barEv"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEv"]
pub fn RealAbstractionWithTonsOfMethods_bar1(this: *mut RealAbstractionWithTonsOfMethods);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3barEi"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3barEi"]
pub fn RealAbstractionWithTonsOfMethods_bar2(
this: *mut RealAbstractionWithTonsOfMethods,
foo: ::std::os::raw::c_int,
);
}
extern "C" {
- #[link_name = "_ZN32RealAbstractionWithTonsOfMethods3staEv"]
+ #[link_name = "\u{1}_ZN32RealAbstractionWithTonsOfMethods3staEv"]
pub fn RealAbstractionWithTonsOfMethods_sta();
}
impl Clone for RealAbstractionWithTonsOfMethods {
diff --git a/tests/expectations/tests/class_nested.rs b/tests/expectations/tests/class_nested.rs
index b0062c9b..cb99f81b 100644
--- a/tests/expectations/tests/class_nested.rs
+++ b/tests/expectations/tests/class_nested.rs
@@ -115,7 +115,7 @@ impl Clone for A_C {
}
}
extern "C" {
- #[link_name = "var"]
+ #[link_name = "\u{1}var"]
pub static mut var: A_B;
}
#[test]
@@ -131,7 +131,7 @@ fn __bindgen_test_layout_A_D_open0_int_close0_instantiation() {
assert_eq ! ( :: std :: mem :: align_of :: < A_D < :: std :: os :: raw :: c_int > > ( ) , 4usize , concat ! ( "Alignment of template specialization: " , stringify ! ( A_D < :: std :: os :: raw :: c_int > ) ) );
}
extern "C" {
- #[link_name = "baz"]
+ #[link_name = "\u{1}baz"]
pub static mut baz: A_D<::std::os::raw::c_int>;
}
#[repr(C)]
diff --git a/tests/expectations/tests/class_static.rs b/tests/expectations/tests/class_static.rs
index 84f129df..93ab9542 100644
--- a/tests/expectations/tests/class_static.rs
+++ b/tests/expectations/tests/class_static.rs
@@ -10,11 +10,11 @@ pub struct MyClass {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN7MyClass7exampleE"]
+ #[link_name = "\u{1}_ZN7MyClass7exampleE"]
pub static mut MyClass_example: *const ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "_ZN7MyClass26example_check_no_collisionE"]
+ #[link_name = "\u{1}_ZN7MyClass26example_check_no_collisionE"]
pub static mut MyClass_example_check_no_collision:
*const ::std::os::raw::c_int;
}
@@ -29,6 +29,6 @@ impl Clone for MyClass {
fn clone(&self) -> Self { *self }
}
extern "C" {
- #[link_name = "_ZL26example_check_no_collision"]
+ #[link_name = "\u{1}_ZL26example_check_no_collision"]
pub static mut example_check_no_collision: *const ::std::os::raw::c_int;
}
diff --git a/tests/expectations/tests/class_with_typedef.rs b/tests/expectations/tests/class_with_typedef.rs
index 159f2735..480b6b34 100644
--- a/tests/expectations/tests/class_with_typedef.rs
+++ b/tests/expectations/tests/class_with_typedef.rs
@@ -47,19 +47,19 @@ fn bindgen_test_layout_C() {
! ( other_ptr ) ));
}
extern "C" {
- #[link_name = "_ZN1C6methodEi"]
+ #[link_name = "\u{1}_ZN1C6methodEi"]
pub fn C_method(this: *mut C, c: C_MyInt);
}
extern "C" {
- #[link_name = "_ZN1C9methodRefERi"]
+ #[link_name = "\u{1}_ZN1C9methodRefERi"]
pub fn C_methodRef(this: *mut C, c: *mut C_MyInt);
}
extern "C" {
- #[link_name = "_ZN1C16complexMethodRefERPKc"]
+ #[link_name = "\u{1}_ZN1C16complexMethodRefERPKc"]
pub fn C_complexMethodRef(this: *mut C, c: *mut C_Lookup);
}
extern "C" {
- #[link_name = "_ZN1C13anotherMethodEi"]
+ #[link_name = "\u{1}_ZN1C13anotherMethodEi"]
pub fn C_anotherMethod(this: *mut C, c: AnotherInt);
}
impl Clone for C {
diff --git a/tests/expectations/tests/complex_global.rs b/tests/expectations/tests/complex_global.rs
index 83135220..defdbe68 100644
--- a/tests/expectations/tests/complex_global.rs
+++ b/tests/expectations/tests/complex_global.rs
@@ -11,14 +11,14 @@ pub struct __BindgenComplex<T> {
pub im: T,
}
extern "C" {
- #[link_name = "globalValueFloat"]
+ #[link_name = "\u{1}globalValueFloat"]
pub static mut globalValueFloat: __BindgenComplex<f32>;
}
extern "C" {
- #[link_name = "globalValueDouble"]
+ #[link_name = "\u{1}globalValueDouble"]
pub static mut globalValueDouble: __BindgenComplex<f64>;
}
extern "C" {
- #[link_name = "globalValueLongDouble"]
+ #[link_name = "\u{1}globalValueLongDouble"]
pub static mut globalValueLongDouble: __BindgenComplex<f64>;
}
diff --git a/tests/expectations/tests/constify-module-enums-types.rs b/tests/expectations/tests/constify-module-enums-types.rs
index 4eb100c4..0c25780b 100644
--- a/tests/expectations/tests/constify-module-enums-types.rs
+++ b/tests/expectations/tests/constify-module-enums-types.rs
@@ -165,12 +165,12 @@ impl Default for Bar {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_Z5func13fooPS_PS0_"]
+ #[link_name = "\u{1}_Z5func13fooPS_PS0_"]
pub fn func1(arg1: foo::Type, arg2: *mut foo::Type,
arg3: *mut *mut foo::Type) -> *mut foo::Type;
}
extern "C" {
- #[link_name = "_Z5func23fooPS_PS0_"]
+ #[link_name = "\u{1}_Z5func23fooPS_PS0_"]
pub fn func2(arg1: foo_alias1, arg2: *mut foo_alias1,
arg3: *mut *mut foo_alias1) -> *mut foo_alias1;
}
@@ -184,10 +184,10 @@ impl <T> Default for Thing<T> {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_Z5func35ThingI3fooE"]
+ #[link_name = "\u{1}_Z5func35ThingI3fooE"]
pub fn func3(arg1: Thing<foo::Type>) -> foo::Type;
}
extern "C" {
- #[link_name = "_Z5func45ThingIS_I3fooEE"]
+ #[link_name = "\u{1}_Z5func45ThingIS_I3fooEE"]
pub fn func4(arg1: Thing<Thing<foo::Type>>) -> foo::Type;
}
diff --git a/tests/expectations/tests/constructor-tp.rs b/tests/expectations/tests/constructor-tp.rs
index 7ce4b9b3..534f70e3 100644
--- a/tests/expectations/tests/constructor-tp.rs
+++ b/tests/expectations/tests/constructor-tp.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Bar() {
"Alignment of " , stringify ! ( Bar ) ));
}
extern "C" {
- #[link_name = "_ZN3BarC1Ev"]
+ #[link_name = "\u{1}_ZN3BarC1Ev"]
pub fn Bar_Bar(this: *mut Bar);
}
impl Clone for Bar {
diff --git a/tests/expectations/tests/constructors.rs b/tests/expectations/tests/constructors.rs
index c267ce1c..bb0d294a 100644
--- a/tests/expectations/tests/constructors.rs
+++ b/tests/expectations/tests/constructors.rs
@@ -17,12 +17,12 @@ fn bindgen_test_layout_TestOverload() {
"Alignment of " , stringify ! ( TestOverload ) ));
}
extern "C" {
- #[link_name = "_ZN12TestOverloadC1Ei"]
+ #[link_name = "\u{1}_ZN12TestOverloadC1Ei"]
pub fn TestOverload_TestOverload(this: *mut TestOverload,
arg1: ::std::os::raw::c_int);
}
extern "C" {
- #[link_name = "_ZN12TestOverloadC1Ed"]
+ #[link_name = "\u{1}_ZN12TestOverloadC1Ed"]
pub fn TestOverload_TestOverload1(this: *mut TestOverload, arg1: f64);
}
impl Clone for TestOverload {
@@ -55,7 +55,7 @@ fn bindgen_test_layout_TestPublicNoArgs() {
( "Alignment of " , stringify ! ( TestPublicNoArgs ) ));
}
extern "C" {
- #[link_name = "_ZN16TestPublicNoArgsC1Ev"]
+ #[link_name = "\u{1}_ZN16TestPublicNoArgsC1Ev"]
pub fn TestPublicNoArgs_TestPublicNoArgs(this: *mut TestPublicNoArgs);
}
impl Clone for TestPublicNoArgs {
diff --git a/tests/expectations/tests/decl_extern_int_twice.rs b/tests/expectations/tests/decl_extern_int_twice.rs
index a7954390..99545758 100644
--- a/tests/expectations/tests/decl_extern_int_twice.rs
+++ b/tests/expectations/tests/decl_extern_int_twice.rs
@@ -5,6 +5,6 @@
extern "C" {
- #[link_name = "foo"]
+ #[link_name = "\u{1}foo"]
pub static mut foo: ::std::os::raw::c_int;
}
diff --git a/tests/expectations/tests/decl_ptr_to_array.rs b/tests/expectations/tests/decl_ptr_to_array.rs
index 4045a121..6d6eeb4b 100644
--- a/tests/expectations/tests/decl_ptr_to_array.rs
+++ b/tests/expectations/tests/decl_ptr_to_array.rs
@@ -5,6 +5,6 @@
extern "C" {
- #[link_name = "foo"]
+ #[link_name = "\u{1}foo"]
pub static mut foo: *mut [::std::os::raw::c_int; 1usize];
}
diff --git a/tests/expectations/tests/default-template-parameter.rs b/tests/expectations/tests/default-template-parameter.rs
index 8dae0c90..8d4ba3dd 100644
--- a/tests/expectations/tests/default-template-parameter.rs
+++ b/tests/expectations/tests/default-template-parameter.rs
@@ -37,6 +37,6 @@ fn __bindgen_test_layout_Foo_open0_bool__int_close0_instantiation() {
);
}
extern "C" {
- #[link_name = "_ZL3bar"]
+ #[link_name = "\u{1}_ZL3bar"]
pub static mut bar: Foo<bool, ::std::os::raw::c_int>;
}
diff --git a/tests/expectations/tests/derive-bitfield-method-same-name.rs b/tests/expectations/tests/derive-bitfield-method-same-name.rs
index 1873d0d6..72b67e66 100644
--- a/tests/expectations/tests/derive-bitfield-method-same-name.rs
+++ b/tests/expectations/tests/derive-bitfield-method-same-name.rs
@@ -39,15 +39,15 @@ fn bindgen_test_layout_Foo() {
);
}
extern "C" {
- #[link_name = "_ZN3Foo4typeEv"]
+ #[link_name = "\u{1}_ZN3Foo4typeEv"]
pub fn Foo_type(this: *mut Foo) -> ::std::os::raw::c_char;
}
extern "C" {
- #[link_name = "_ZN3Foo9set_type_Ec"]
+ #[link_name = "\u{1}_ZN3Foo9set_type_Ec"]
pub fn Foo_set_type_(this: *mut Foo, c: ::std::os::raw::c_char);
}
extern "C" {
- #[link_name = "_ZN3Foo8set_typeEc"]
+ #[link_name = "\u{1}_ZN3Foo8set_typeEc"]
pub fn Foo_set_type(this: *mut Foo, c: ::std::os::raw::c_char);
}
impl Clone for Foo {
diff --git a/tests/expectations/tests/elaborated.rs b/tests/expectations/tests/elaborated.rs
index fbbef1cf..f68b55af 100644
--- a/tests/expectations/tests/elaborated.rs
+++ b/tests/expectations/tests/elaborated.rs
@@ -6,6 +6,6 @@
pub type whatever_whatever_t = ::std::os::raw::c_int;
extern "C" {
- #[link_name = "_Z9somethingPKi"]
+ #[link_name = "\u{1}_Z9somethingPKi"]
pub fn something(wat: *const whatever_whatever_t);
}
diff --git a/tests/expectations/tests/enum_and_vtable_mangling.rs b/tests/expectations/tests/enum_and_vtable_mangling.rs
index 9cdd1127..b3e49f4f 100644
--- a/tests/expectations/tests/enum_and_vtable_mangling.rs
+++ b/tests/expectations/tests/enum_and_vtable_mangling.rs
@@ -35,6 +35,6 @@ impl Default for C {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN1C5matchEv"]
+ #[link_name = "\u{1}_ZN1C5matchEv"]
pub fn C_match(this: *mut ::std::os::raw::c_void);
}
diff --git a/tests/expectations/tests/forward_declared_complex_types.rs b/tests/expectations/tests/forward_declared_complex_types.rs
index 9baa2d8d..e02ba76c 100644
--- a/tests/expectations/tests/forward_declared_complex_types.rs
+++ b/tests/expectations/tests/forward_declared_complex_types.rs
@@ -48,7 +48,7 @@ impl Default for Bar {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_Z10baz_structP3Foo"]
+ #[link_name = "\u{1}_Z10baz_structP3Foo"]
pub fn baz_struct(f: *mut Foo);
}
#[repr(C)]
@@ -57,7 +57,7 @@ pub struct Union {
_unused: [u8; 0],
}
extern "C" {
- #[link_name = "_Z9baz_unionP5Union"]
+ #[link_name = "\u{1}_Z9baz_unionP5Union"]
pub fn baz_union(u: *mut Union);
}
#[repr(C)]
@@ -66,6 +66,6 @@ pub struct Quux {
_unused: [u8; 0],
}
extern "C" {
- #[link_name = "_Z9baz_classP4Quux"]
+ #[link_name = "\u{1}_Z9baz_classP4Quux"]
pub fn baz_class(q: *mut Quux);
}
diff --git a/tests/expectations/tests/forward_declared_complex_types_1_0.rs b/tests/expectations/tests/forward_declared_complex_types_1_0.rs
index 9baa2d8d..e02ba76c 100644
--- a/tests/expectations/tests/forward_declared_complex_types_1_0.rs
+++ b/tests/expectations/tests/forward_declared_complex_types_1_0.rs
@@ -48,7 +48,7 @@ impl Default for Bar {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_Z10baz_structP3Foo"]
+ #[link_name = "\u{1}_Z10baz_structP3Foo"]
pub fn baz_struct(f: *mut Foo);
}
#[repr(C)]
@@ -57,7 +57,7 @@ pub struct Union {
_unused: [u8; 0],
}
extern "C" {
- #[link_name = "_Z9baz_unionP5Union"]
+ #[link_name = "\u{1}_Z9baz_unionP5Union"]
pub fn baz_union(u: *mut Union);
}
#[repr(C)]
@@ -66,6 +66,6 @@ pub struct Quux {
_unused: [u8; 0],
}
extern "C" {
- #[link_name = "_Z9baz_classP4Quux"]
+ #[link_name = "\u{1}_Z9baz_classP4Quux"]
pub fn baz_class(q: *mut Quux);
}
diff --git a/tests/expectations/tests/func_ptr.rs b/tests/expectations/tests/func_ptr.rs
index fb3860a4..79f27df2 100644
--- a/tests/expectations/tests/func_ptr.rs
+++ b/tests/expectations/tests/func_ptr.rs
@@ -5,7 +5,7 @@
extern "C" {
- #[link_name = "foo"]
+ #[link_name = "\u{1}foo"]
pub static mut foo:
::std::option::Option<unsafe extern "C" fn(x:
::std::os::raw::c_int,
diff --git a/tests/expectations/tests/gen-constructors.rs b/tests/expectations/tests/gen-constructors.rs
index c811efb8..07fded03 100644
--- a/tests/expectations/tests/gen-constructors.rs
+++ b/tests/expectations/tests/gen-constructors.rs
@@ -23,7 +23,7 @@ fn bindgen_test_layout_Foo() {
);
}
extern "C" {
- #[link_name = "_ZN3FooC1Ei"]
+ #[link_name = "\u{1}_ZN3FooC1Ei"]
pub fn Foo_Foo(this: *mut Foo, a: ::std::os::raw::c_int);
}
impl Clone for Foo {
diff --git a/tests/expectations/tests/gen-destructors.rs b/tests/expectations/tests/gen-destructors.rs
index 711d6f23..c13abf83 100644
--- a/tests/expectations/tests/gen-destructors.rs
+++ b/tests/expectations/tests/gen-destructors.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Foo() {
stringify ! ( bar ) ));
}
extern "C" {
- #[link_name = "_ZN3FooD1Ev"]
+ #[link_name = "\u{1}_ZN3FooD1Ev"]
pub fn Foo_Foo_destructor(this: *mut Foo);
}
impl Foo {
diff --git a/tests/expectations/tests/generate-inline.rs b/tests/expectations/tests/generate-inline.rs
index 15f944d3..f123acef 100644
--- a/tests/expectations/tests/generate-inline.rs
+++ b/tests/expectations/tests/generate-inline.rs
@@ -17,7 +17,7 @@ fn bindgen_test_layout_Foo() {
"Alignment of " , stringify ! ( Foo ) ));
}
extern "C" {
- #[link_name = "_ZN3Foo3barEv"]
+ #[link_name = "\u{1}_ZN3Foo3barEv"]
pub fn Foo_bar() -> ::std::os::raw::c_int;
}
impl Clone for Foo {
@@ -28,6 +28,6 @@ impl Foo {
pub unsafe fn bar() -> ::std::os::raw::c_int { Foo_bar() }
}
extern "C" {
- #[link_name = "_Z3foov"]
+ #[link_name = "\u{1}_Z3foov"]
pub fn foo() -> ::std::os::raw::c_int;
}
diff --git a/tests/expectations/tests/inner_const.rs b/tests/expectations/tests/inner_const.rs
index dd92dac9..1315bb6a 100644
--- a/tests/expectations/tests/inner_const.rs
+++ b/tests/expectations/tests/inner_const.rs
@@ -10,11 +10,11 @@ pub struct Foo {
pub bar: ::std::os::raw::c_int,
}
extern "C" {
- #[link_name = "_ZN3Foo3BOOE"]
+ #[link_name = "\u{1}_ZN3Foo3BOOE"]
pub static mut Foo_BOO: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "_ZN3Foo8whateverE"]
+ #[link_name = "\u{1}_ZN3Foo8whateverE"]
pub static mut Foo_whatever: Foo;
}
#[test]
diff --git a/tests/expectations/tests/issue-410.rs b/tests/expectations/tests/issue-410.rs
index b0366f1c..2fcefa12 100644
--- a/tests/expectations/tests/issue-410.rs
+++ b/tests/expectations/tests/issue-410.rs
@@ -30,7 +30,7 @@ pub mod root {
);
}
extern "C" {
- #[link_name = "_ZN2JS5Value1aE10JSWhyMagic"]
+ #[link_name = "\u{1}_ZN2JS5Value1aE10JSWhyMagic"]
pub fn Value_a(this: *mut root::JS::Value, arg1: root::JSWhyMagic);
}
impl Clone for Value {
diff --git a/tests/expectations/tests/issue-447.rs b/tests/expectations/tests/issue-447.rs
index 7102235f..66e1c043 100644
--- a/tests/expectations/tests/issue-447.rs
+++ b/tests/expectations/tests/issue-447.rs
@@ -58,7 +58,7 @@ pub mod root {
);
}
extern "C" {
- #[link_name = "_ZN17JSAutoCompartmentC1EN7mozilla6detail19GuardObjectNotifierE"]
+ #[link_name = "\u{1}_ZN17JSAutoCompartmentC1EN7mozilla6detail19GuardObjectNotifierE"]
pub fn JSAutoCompartment_JSAutoCompartment(
this: *mut root::JSAutoCompartment,
arg1: root::mozilla::detail::GuardObjectNotifier,
diff --git a/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs b/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
index dd987b76..0d13c10d 100644
--- a/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
+++ b/tests/expectations/tests/issue-574-assertion-failure-in-codegen.rs
@@ -30,7 +30,7 @@ impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
extern "C" {
- #[link_name = "AutoIdVector"]
+ #[link_name = "\u{1}AutoIdVector"]
pub static mut AutoIdVector: _bindgen_ty_1;
}
#[test]
diff --git a/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs b/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
index d0ccacef..87b38f28 100644
--- a/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
+++ b/tests/expectations/tests/issue-584-stylo-template-analysis-panic.rs
@@ -67,7 +67,7 @@ impl Default for b {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_Z25Servo_Element_GetSnapshotv"]
+ #[link_name = "\u{1}_Z25Servo_Element_GetSnapshotv"]
pub fn Servo_Element_GetSnapshot() -> A;
}
#[test]
diff --git a/tests/expectations/tests/issue-801-opaque-sloppiness.rs b/tests/expectations/tests/issue-801-opaque-sloppiness.rs
index dbf21cf9..b07e17c4 100644
--- a/tests/expectations/tests/issue-801-opaque-sloppiness.rs
+++ b/tests/expectations/tests/issue-801-opaque-sloppiness.rs
@@ -25,7 +25,7 @@ impl Clone for B {
fn clone(&self) -> Self { *self }
}
extern "C" {
- #[link_name = "_ZN1B1aE"]
+ #[link_name = "\u{1}_ZN1B1aE"]
pub static mut B_a: A;
}
#[repr(C)]
diff --git a/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs b/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
index ed7d8a73..1e153606 100644
--- a/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
+++ b/tests/expectations/tests/issue-807-opaque-types-methods-being-generated.rs
@@ -62,11 +62,11 @@ fn bindgen_test_layout_Opaque() {
"Alignment of " , stringify ! ( Opaque ) ));
}
extern "C" {
- #[link_name = "_ZN6Opaque17eleven_out_of_tenEv"]
+ #[link_name = "\u{1}_ZN6Opaque17eleven_out_of_tenEv"]
pub fn Opaque_eleven_out_of_ten(this: *mut Opaque) -> SuchWow;
}
extern "C" {
- #[link_name = "_ZN6OpaqueC1E6Pupper"]
+ #[link_name = "\u{1}_ZN6OpaqueC1E6Pupper"]
pub fn Opaque_Opaque(this: *mut Opaque, pup: Pupper);
}
impl Clone for Opaque {
@@ -85,7 +85,7 @@ impl Opaque {
}
}
extern "C" {
- #[link_name = "_ZN6Opaque11MAJESTIC_AFE"]
+ #[link_name = "\u{1}_ZN6Opaque11MAJESTIC_AFE"]
pub static mut Opaque_MAJESTIC_AF: Doggo;
}
#[repr(C)]
diff --git a/tests/expectations/tests/issue-888-enum-var-decl-jump.rs b/tests/expectations/tests/issue-888-enum-var-decl-jump.rs
index e0330d5f..9f446d70 100644
--- a/tests/expectations/tests/issue-888-enum-var-decl-jump.rs
+++ b/tests/expectations/tests/issue-888-enum-var-decl-jump.rs
@@ -17,7 +17,7 @@ pub mod root {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN6Halide4Type1bE"]
+ #[link_name = "\u{1}_ZN6Halide4Type1bE"]
pub static mut Type_b: root::a;
}
#[test]
diff --git a/tests/expectations/tests/keywords.rs b/tests/expectations/tests/keywords.rs
index 037a8d80..b354f431 100644
--- a/tests/expectations/tests/keywords.rs
+++ b/tests/expectations/tests/keywords.rs
@@ -5,198 +5,198 @@
extern "C" {
- #[link_name = "u8"]
+ #[link_name = "\u{1}u8"]
pub static mut u8: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "u16"]
+ #[link_name = "\u{1}u16"]
pub static mut u16: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "u32"]
+ #[link_name = "\u{1}u32"]
pub static mut u32: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "u64"]
+ #[link_name = "\u{1}u64"]
pub static mut u64: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "i8"]
+ #[link_name = "\u{1}i8"]
pub static mut i8: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "i16"]
+ #[link_name = "\u{1}i16"]
pub static mut i16: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "i32"]
+ #[link_name = "\u{1}i32"]
pub static mut i32: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "i64"]
+ #[link_name = "\u{1}i64"]
pub static mut i64: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "f32"]
+ #[link_name = "\u{1}f32"]
pub static mut f32: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "f64"]
+ #[link_name = "\u{1}f64"]
pub static mut f64: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "usize"]
+ #[link_name = "\u{1}usize"]
pub static mut usize: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "isize"]
+ #[link_name = "\u{1}isize"]
pub static mut isize: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "as"]
+ #[link_name = "\u{1}as"]
pub static mut as_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "box"]
+ #[link_name = "\u{1}box"]
pub static mut box_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "crate"]
+ #[link_name = "\u{1}crate"]
pub static mut crate_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "false"]
+ #[link_name = "\u{1}false"]
pub static mut false_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "fn"]
+ #[link_name = "\u{1}fn"]
pub static mut fn_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "impl"]
+ #[link_name = "\u{1}impl"]
pub static mut impl_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "in"]
+ #[link_name = "\u{1}in"]
pub static mut in_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "let"]
+ #[link_name = "\u{1}let"]
pub static mut let_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "loop"]
+ #[link_name = "\u{1}loop"]
pub static mut loop_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "match"]
+ #[link_name = "\u{1}match"]
pub static mut match_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "mod"]
+ #[link_name = "\u{1}mod"]
pub static mut mod_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "move"]
+ #[link_name = "\u{1}move"]
pub static mut move_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "mut"]
+ #[link_name = "\u{1}mut"]
pub static mut mut_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "pub"]
+ #[link_name = "\u{1}pub"]
pub static mut pub_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "ref"]
+ #[link_name = "\u{1}ref"]
pub static mut ref_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "self"]
+ #[link_name = "\u{1}self"]
pub static mut self_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "Self"]
+ #[link_name = "\u{1}Self"]
pub static mut Self_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "super"]
+ #[link_name = "\u{1}super"]
pub static mut super_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "trait"]
+ #[link_name = "\u{1}trait"]
pub static mut trait_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "true"]
+ #[link_name = "\u{1}true"]
pub static mut true_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "type"]
+ #[link_name = "\u{1}type"]
pub static mut type_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "unsafe"]
+ #[link_name = "\u{1}unsafe"]
pub static mut unsafe_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "use"]
+ #[link_name = "\u{1}use"]
pub static mut use_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "where"]
+ #[link_name = "\u{1}where"]
pub static mut where_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "abstract"]
+ #[link_name = "\u{1}abstract"]
pub static mut abstract_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "alignof"]
+ #[link_name = "\u{1}alignof"]
pub static mut alignof_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "become"]
+ #[link_name = "\u{1}become"]
pub static mut become_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "final"]
+ #[link_name = "\u{1}final"]
pub static mut final_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "macro"]
+ #[link_name = "\u{1}macro"]
pub static mut macro_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "offsetof"]
+ #[link_name = "\u{1}offsetof"]
pub static mut offsetof_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "override"]
+ #[link_name = "\u{1}override"]
pub static mut override_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "priv"]
+ #[link_name = "\u{1}priv"]
pub static mut priv_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "proc"]
+ #[link_name = "\u{1}proc"]
pub static mut proc_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "pure"]
+ #[link_name = "\u{1}pure"]
pub static mut pure_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "unsized"]
+ #[link_name = "\u{1}unsized"]
pub static mut unsized_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "virtual"]
+ #[link_name = "\u{1}virtual"]
pub static mut virtual_: ::std::os::raw::c_int;
}
extern "C" {
- #[link_name = "yield"]
+ #[link_name = "\u{1}yield"]
pub static mut yield_: ::std::os::raw::c_int;
}
diff --git a/tests/expectations/tests/libclang-3.8/auto.rs b/tests/expectations/tests/libclang-3.8/auto.rs
index 6e2d9af3..b86a5c9e 100644
--- a/tests/expectations/tests/libclang-3.8/auto.rs
+++ b/tests/expectations/tests/libclang-3.8/auto.rs
@@ -10,7 +10,7 @@ pub struct Foo {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN3Foo4kFooE"]
+ #[link_name = "\u{1}_ZN3Foo4kFooE"]
pub static mut Foo_kFoo: bool;
}
#[test]
@@ -37,6 +37,6 @@ pub struct Bar {
pub _address: u8,
}
extern "C" {
- #[link_name = "_Z5Test2v"]
+ #[link_name = "\u{1}_Z5Test2v"]
pub fn Test2() -> ::std::os::raw::c_uint;
}
diff --git a/tests/expectations/tests/libclang-3.8/call-conv-field.rs b/tests/expectations/tests/libclang-3.8/call-conv-field.rs
index c5769c4c..6bbffa1a 100644
--- a/tests/expectations/tests/libclang-3.8/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-3.8/call-conv-field.rs
@@ -57,6 +57,6 @@ impl Default for JNINativeInterface_ {
}
}
extern "C" {
- #[link_name = "_bar@0"]
+ #[link_name = "\u{1}_bar@0"]
pub fn bar();
}
diff --git a/tests/expectations/tests/libclang-3.8/const_bool.rs b/tests/expectations/tests/libclang-3.8/const_bool.rs
index ad6a60d8..1f5fcf63 100644
--- a/tests/expectations/tests/libclang-3.8/const_bool.rs
+++ b/tests/expectations/tests/libclang-3.8/const_bool.rs
@@ -5,7 +5,7 @@
extern "C" {
- #[link_name = "_ZL1k"]
+ #[link_name = "\u{1}_ZL1k"]
pub static mut k: bool;
}
#[repr(C)]
@@ -14,7 +14,7 @@ pub struct A {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN1A1kE"]
+ #[link_name = "\u{1}_ZN1A1kE"]
pub static mut A_k: bool;
}
#[test]
@@ -37,6 +37,6 @@ impl Clone for A {
}
pub type foo = bool;
extern "C" {
- #[link_name = "_ZL2k2"]
+ #[link_name = "\u{1}_ZL2k2"]
pub static mut k2: foo;
}
diff --git a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs
index 4f9e62da..8faddfe9 100644
--- a/tests/expectations/tests/libclang-3.8/constant-evaluate.rs
+++ b/tests/expectations/tests/libclang-3.8/constant-evaluate.rs
@@ -12,30 +12,30 @@ pub enum _bindgen_ty_1 { foo = 4, bar = 8, }
pub type EasyToOverflow = ::std::os::raw::c_ulonglong;
pub const k: EasyToOverflow = 2147483648;
extern "C" {
- #[link_name = "k_expr"]
+ #[link_name = "\u{1}k_expr"]
pub static mut k_expr: EasyToOverflow;
}
extern "C" {
- #[link_name = "BAZ"]
+ #[link_name = "\u{1}BAZ"]
pub static mut BAZ: ::std::os::raw::c_longlong;
}
extern "C" {
- #[link_name = "fuzz"]
+ #[link_name = "\u{1}fuzz"]
pub static mut fuzz: f64;
}
extern "C" {
- #[link_name = "BAZZ"]
+ #[link_name = "\u{1}BAZZ"]
pub static mut BAZZ: ::std::os::raw::c_char;
}
extern "C" {
- #[link_name = "WAT"]
+ #[link_name = "\u{1}WAT"]
pub static mut WAT: ::std::os::raw::c_char;
}
extern "C" {
- #[link_name = "bytestring"]
+ #[link_name = "\u{1}bytestring"]
pub static mut bytestring: *const ::std::os::raw::c_char;
}
extern "C" {
- #[link_name = "NOT_UTF8"]
+ #[link_name = "\u{1}NOT_UTF8"]
pub static mut NOT_UTF8: *const ::std::os::raw::c_char;
}
diff --git a/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs
index d867e73a..960b5522 100644
--- a/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs
+++ b/tests/expectations/tests/libclang-3.8/partial-specialization-and-inheritance.rs
@@ -20,7 +20,7 @@ pub struct Usage {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN5Usage13static_memberE"]
+ #[link_name = "\u{1}_ZN5Usage13static_memberE"]
pub static mut Usage_static_member: [u32; 2usize];
}
#[test]
@@ -37,7 +37,7 @@ fn bindgen_test_layout_Usage() {
);
}
extern "C" {
- #[link_name = "_ZN5UsageC1Ev"]
+ #[link_name = "\u{1}_ZN5UsageC1Ev"]
pub fn Usage_Usage(this: *mut Usage);
}
impl Clone for Usage {
diff --git a/tests/expectations/tests/libclang-3.9/auto.rs b/tests/expectations/tests/libclang-3.9/auto.rs
index 4f5ee5b6..50acff2e 100644
--- a/tests/expectations/tests/libclang-3.9/auto.rs
+++ b/tests/expectations/tests/libclang-3.9/auto.rs
@@ -34,6 +34,6 @@ pub struct Bar {
pub _address: u8,
}
extern "C" {
- #[link_name = "_Z5Test2v"]
+ #[link_name = "\u{1}_Z5Test2v"]
pub fn Test2() -> ::std::os::raw::c_uint;
}
diff --git a/tests/expectations/tests/libclang-3.9/call-conv-field.rs b/tests/expectations/tests/libclang-3.9/call-conv-field.rs
index ea794b68..8896946e 100644
--- a/tests/expectations/tests/libclang-3.9/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-3.9/call-conv-field.rs
@@ -57,6 +57,6 @@ impl Default for JNINativeInterface_ {
}
}
extern "stdcall" {
- #[link_name = "_bar@0"]
+ #[link_name = "\u{1}_bar@0"]
pub fn bar();
}
diff --git a/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs
index 84319c75..416711ad 100644
--- a/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs
+++ b/tests/expectations/tests/libclang-3.9/partial-specialization-and-inheritance.rs
@@ -20,7 +20,7 @@ pub struct Usage {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN5Usage13static_memberE"]
+ #[link_name = "\u{1}_ZN5Usage13static_memberE"]
pub static mut Usage_static_member: [u32; 2usize];
}
#[test]
diff --git a/tests/expectations/tests/libclang-4/auto.rs b/tests/expectations/tests/libclang-4/auto.rs
index 70743067..1575d051 100644
--- a/tests/expectations/tests/libclang-4/auto.rs
+++ b/tests/expectations/tests/libclang-4/auto.rs
@@ -26,6 +26,6 @@ pub struct Bar {
pub _address: u8,
}
extern "C" {
- #[link_name = "_Z5Test2v"]
+ #[link_name = "\u{1}_Z5Test2v"]
pub fn Test2() -> ::std::os::raw::c_uint;
}
diff --git a/tests/expectations/tests/libclang-4/call-conv-field.rs b/tests/expectations/tests/libclang-4/call-conv-field.rs
index 39943119..648560cf 100644
--- a/tests/expectations/tests/libclang-4/call-conv-field.rs
+++ b/tests/expectations/tests/libclang-4/call-conv-field.rs
@@ -37,6 +37,6 @@ impl Default for JNINativeInterface_ {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "stdcall" {
- #[link_name = "_bar@0"]
+ #[link_name = "\u{1}_bar@0"]
pub fn bar();
}
diff --git a/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs b/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs
index 4f6794e9..1cb28c14 100644
--- a/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs
+++ b/tests/expectations/tests/libclang-4/partial-specialization-and-inheritance.rs
@@ -20,7 +20,7 @@ pub struct Usage {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN5Usage13static_memberE"]
+ #[link_name = "\u{1}_ZN5Usage13static_memberE"]
pub static mut Usage_static_member: [u32; 2usize];
}
#[test]
diff --git a/tests/expectations/tests/mangling-ios.rs b/tests/expectations/tests/mangling-ios.rs
index 87df5e4a..0fddb5d7 100644
--- a/tests/expectations/tests/mangling-ios.rs
+++ b/tests/expectations/tests/mangling-ios.rs
@@ -5,5 +5,6 @@
extern "C" {
+ #[link_name = "\u{1}_foo"]
pub fn foo();
}
diff --git a/tests/expectations/tests/mangling-linux32.rs b/tests/expectations/tests/mangling-linux32.rs
index 5aa7bd55..96186774 100644
--- a/tests/expectations/tests/mangling-linux32.rs
+++ b/tests/expectations/tests/mangling-linux32.rs
@@ -13,7 +13,7 @@ pub struct Foo {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN3Foo4sBarE"]
+ #[link_name = "\u{1}_ZN3Foo4sBarE"]
pub static mut Foo_sBar: bool;
}
#[test]
diff --git a/tests/expectations/tests/mangling-linux64.rs b/tests/expectations/tests/mangling-linux64.rs
index 5aa7bd55..96186774 100644
--- a/tests/expectations/tests/mangling-linux64.rs
+++ b/tests/expectations/tests/mangling-linux64.rs
@@ -13,7 +13,7 @@ pub struct Foo {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN3Foo4sBarE"]
+ #[link_name = "\u{1}_ZN3Foo4sBarE"]
pub static mut Foo_sBar: bool;
}
#[test]
diff --git a/tests/expectations/tests/mangling-macos.rs b/tests/expectations/tests/mangling-macos.rs
index 5aa7bd55..6f758141 100644
--- a/tests/expectations/tests/mangling-macos.rs
+++ b/tests/expectations/tests/mangling-macos.rs
@@ -5,6 +5,7 @@
extern "C" {
+ #[link_name = "\u{1}_foo"]
pub fn foo();
}
#[repr(C)]
@@ -13,7 +14,7 @@ pub struct Foo {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN3Foo4sBarE"]
+ #[link_name = "\u{1}__ZN3Foo4sBarE"]
pub static mut Foo_sBar: bool;
}
#[test]
diff --git a/tests/expectations/tests/mangling-win32.rs b/tests/expectations/tests/mangling-win32.rs
index 747ccbf5..e21228a1 100644
--- a/tests/expectations/tests/mangling-win32.rs
+++ b/tests/expectations/tests/mangling-win32.rs
@@ -5,6 +5,7 @@
extern "C" {
+ #[link_name = "\u{1}_foo"]
pub fn foo();
}
#[repr(C)]
diff --git a/tests/expectations/tests/mangling-win64.rs b/tests/expectations/tests/mangling-win64.rs
index ae5cc9cc..ffaf52cf 100644
--- a/tests/expectations/tests/mangling-win64.rs
+++ b/tests/expectations/tests/mangling-win64.rs
@@ -13,7 +13,7 @@ pub struct Foo {
pub _address: u8,
}
extern "C" {
- #[link_name = "?sBar@Foo@@2_NA"]
+ #[link_name = "\u{1}?sBar@Foo@@2_NA"]
pub static mut Foo_sBar: bool;
}
#[test]
diff --git a/tests/expectations/tests/method-mangling.rs b/tests/expectations/tests/method-mangling.rs
index 765ca5fb..e44b6e7d 100644
--- a/tests/expectations/tests/method-mangling.rs
+++ b/tests/expectations/tests/method-mangling.rs
@@ -17,7 +17,7 @@ fn bindgen_test_layout_Foo() {
"Alignment of " , stringify ! ( Foo ) ));
}
extern "C" {
- #[link_name = "_ZN3Foo4typeEv"]
+ #[link_name = "\u{1}_ZN3Foo4typeEv"]
pub fn Foo_type(this: *mut Foo) -> ::std::os::raw::c_int;
}
impl Clone for Foo {
diff --git a/tests/expectations/tests/namespace.rs b/tests/expectations/tests/namespace.rs
index dec8fabb..6349748d 100644
--- a/tests/expectations/tests/namespace.rs
+++ b/tests/expectations/tests/namespace.rs
@@ -9,7 +9,7 @@ pub mod root {
#[allow(unused_imports)]
use self::super::root;
extern "C" {
- #[link_name = "_Z9top_levelv"]
+ #[link_name = "\u{1}_Z9top_levelv"]
pub fn top_level();
}
pub mod whatever {
@@ -17,7 +17,7 @@ pub mod root {
use self::super::super::root;
pub type whatever_int_t = ::std::os::raw::c_int;
extern "C" {
- #[link_name = "_ZN8whatever11in_whateverEv"]
+ #[link_name = "\u{1}_ZN8whatever11in_whateverEv"]
pub fn in_whatever();
}
}
@@ -25,7 +25,7 @@ pub mod root {
#[allow(unused_imports)]
use self::super::super::root;
extern "C" {
- #[link_name = "_ZN12_GLOBAL__N_13fooEv"]
+ #[link_name = "\u{1}_ZN12_GLOBAL__N_13fooEv"]
pub fn foo();
}
#[repr(C)]
@@ -52,7 +52,7 @@ pub mod root {
);
}
extern "C" {
- #[link_name = "_ZN12_GLOBAL__N_11A20lets_hope_this_worksEv"]
+ #[link_name = "\u{1}_ZN12_GLOBAL__N_11A20lets_hope_this_worksEv"]
pub fn A_lets_hope_this_works(
this: *mut root::_bindgen_mod_id_13::A,
) -> ::std::os::raw::c_int;
@@ -99,15 +99,15 @@ pub mod root {
}
}
extern "C" {
- #[link_name = "_ZN1w3hehEv"]
+ #[link_name = "\u{1}_ZN1w3hehEv"]
pub fn heh() -> root::w::whatever_int_t;
}
extern "C" {
- #[link_name = "_ZN1w3fooEv"]
+ #[link_name = "\u{1}_ZN1w3fooEv"]
pub fn foo() -> root::C<::std::os::raw::c_int>;
}
extern "C" {
- #[link_name = "_ZN1w4barrEv"]
+ #[link_name = "\u{1}_ZN1w4barrEv"]
pub fn barr() -> root::C<f32>;
}
}
diff --git a/tests/expectations/tests/nested_vtable.rs b/tests/expectations/tests/nested_vtable.rs
index 470fee41..d6579ec2 100644
--- a/tests/expectations/tests/nested_vtable.rs
+++ b/tests/expectations/tests/nested_vtable.rs
@@ -25,7 +25,7 @@ impl Default for nsISupports {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN11nsISupports14QueryInterfaceEv"]
+ #[link_name = "\u{1}_ZN11nsISupports14QueryInterfaceEv"]
pub fn nsISupports_QueryInterface(this: *mut ::std::os::raw::c_void)
-> *mut nsISupports;
}
diff --git a/tests/expectations/tests/objc_class.rs b/tests/expectations/tests/objc_class.rs
index 31473c51..2f6f00c7 100644
--- a/tests/expectations/tests/objc_class.rs
+++ b/tests/expectations/tests/objc_class.rs
@@ -10,7 +10,7 @@ extern crate objc;
#[allow(non_camel_case_types)]
pub type id = *mut objc::runtime::Object;
extern "C" {
- #[link_name = "fooVar"]
+ #[link_name = "\u{1}fooVar"]
pub static mut fooVar: *mut id;
}
pub trait Foo {
diff --git a/tests/expectations/tests/objc_interface_type.rs b/tests/expectations/tests/objc_interface_type.rs
index a43b3e69..0b3721ef 100644
--- a/tests/expectations/tests/objc_interface_type.rs
+++ b/tests/expectations/tests/objc_interface_type.rs
@@ -38,6 +38,6 @@ extern "C" {
pub fn fooFunc(foo: id);
}
extern "C" {
- #[link_name = "kFoo"]
+ #[link_name = "\u{1}kFoo"]
pub static mut kFoo: *const id;
}
diff --git a/tests/expectations/tests/objc_sel_and_id.rs b/tests/expectations/tests/objc_sel_and_id.rs
index 0784c21e..9c05aca0 100644
--- a/tests/expectations/tests/objc_sel_and_id.rs
+++ b/tests/expectations/tests/objc_sel_and_id.rs
@@ -10,11 +10,11 @@ extern crate objc;
#[allow(non_camel_case_types)]
pub type id = *mut objc::runtime::Object;
extern "C" {
- #[link_name = "object"]
+ #[link_name = "\u{1}object"]
pub static mut object: id;
}
extern "C" {
- #[link_name = "selector"]
+ #[link_name = "\u{1}selector"]
pub static mut selector: objc::runtime::Sel;
}
extern "C" {
diff --git a/tests/expectations/tests/opaque-tracing.rs b/tests/expectations/tests/opaque-tracing.rs
index 9d28d7c2..afae3127 100644
--- a/tests/expectations/tests/opaque-tracing.rs
+++ b/tests/expectations/tests/opaque-tracing.rs
@@ -5,7 +5,7 @@
extern "C" {
- #[link_name = "_Z3fooP9Container"]
+ #[link_name = "\u{1}_Z3fooP9Container"]
pub fn foo(c: *mut Container);
}
#[repr(C)]
diff --git a/tests/expectations/tests/overloading.rs b/tests/expectations/tests/overloading.rs
index 45c3ead1..ab417e8e 100644
--- a/tests/expectations/tests/overloading.rs
+++ b/tests/expectations/tests/overloading.rs
@@ -5,19 +5,19 @@
extern "C" {
- #[link_name = "_Z8Evaluatec"]
+ #[link_name = "\u{1}_Z8Evaluatec"]
pub fn Evaluate(r: ::std::os::raw::c_char) -> bool;
}
extern "C" {
- #[link_name = "_Z8Evaluateii"]
+ #[link_name = "\u{1}_Z8Evaluateii"]
pub fn Evaluate1(x: ::std::os::raw::c_int, y: ::std::os::raw::c_int)
-> bool;
}
extern "C" {
- #[link_name = "_ZN3foo10MyFunctionEv"]
+ #[link_name = "\u{1}_ZN3foo10MyFunctionEv"]
pub fn foo_MyFunction();
}
extern "C" {
- #[link_name = "_ZN3bar10MyFunctionEv"]
+ #[link_name = "\u{1}_ZN3bar10MyFunctionEv"]
pub fn bar_MyFunction();
}
diff --git a/tests/expectations/tests/public-dtor.rs b/tests/expectations/tests/public-dtor.rs
index bf8f1e58..dab29762 100644
--- a/tests/expectations/tests/public-dtor.rs
+++ b/tests/expectations/tests/public-dtor.rs
@@ -17,7 +17,7 @@ fn bindgen_test_layout_cv_String() {
"Alignment of " , stringify ! ( cv_String ) ));
}
extern "C" {
- #[link_name = "_ZN2cv6StringD1Ev"]
+ #[link_name = "\u{1}_ZN2cv6StringD1Ev"]
pub fn cv_String_String_destructor(this: *mut cv_String);
}
impl cv_String {
diff --git a/tests/expectations/tests/ref_argument_array.rs b/tests/expectations/tests/ref_argument_array.rs
index dc1465c3..ea5d0e18 100644
--- a/tests/expectations/tests/ref_argument_array.rs
+++ b/tests/expectations/tests/ref_argument_array.rs
@@ -26,7 +26,7 @@ impl Default for nsID {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN4nsID16ToProvidedStringERA10_c"]
+ #[link_name = "\u{1}_ZN4nsID16ToProvidedStringERA10_c"]
pub fn nsID_ToProvidedString(this: *mut ::std::os::raw::c_void,
aDest:
*mut [::std::os::raw::c_char; 10usize]);
diff --git a/tests/expectations/tests/template.rs b/tests/expectations/tests/template.rs
index 067ed380..3f397b6f 100644
--- a/tests/expectations/tests/template.rs
+++ b/tests/expectations/tests/template.rs
@@ -29,7 +29,7 @@ impl<T> Default for B<T> {
}
}
extern "C" {
- #[link_name = "_Z3bar3FooIiiE"]
+ #[link_name = "\u{1}_Z3bar3FooIiiE"]
pub fn bar(foo: Foo<::std::os::raw::c_int>);
}
#[repr(C)]
diff --git a/tests/expectations/tests/test_multiple_header_calls_in_builder.rs b/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
index 5f009f85..88dc5d8b 100644
--- a/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
+++ b/tests/expectations/tests/test_multiple_header_calls_in_builder.rs
@@ -1,7 +1,7 @@
/* automatically generated by rust-bindgen */
extern "C" {
- #[link_name = "foo"]
+ #[link_name = "\u{1}foo"]
pub static mut foo:
::std::option::Option<unsafe extern "C" fn(x:
::std::os::raw::c_int,
diff --git a/tests/expectations/tests/union_dtor.rs b/tests/expectations/tests/union_dtor.rs
index a0404ac9..0721494f 100644
--- a/tests/expectations/tests/union_dtor.rs
+++ b/tests/expectations/tests/union_dtor.rs
@@ -28,7 +28,7 @@ fn bindgen_test_layout_UnionWithDtor() {
, stringify ! ( mBar ) ));
}
extern "C" {
- #[link_name = "_ZN13UnionWithDtorD1Ev"]
+ #[link_name = "\u{1}_ZN13UnionWithDtorD1Ev"]
pub fn UnionWithDtor_UnionWithDtor_destructor(this: *mut UnionWithDtor);
}
impl Default for UnionWithDtor {
diff --git a/tests/expectations/tests/union_dtor_1_0.rs b/tests/expectations/tests/union_dtor_1_0.rs
index 2c8f80d7..c59d4f35 100644
--- a/tests/expectations/tests/union_dtor_1_0.rs
+++ b/tests/expectations/tests/union_dtor_1_0.rs
@@ -60,7 +60,7 @@ fn bindgen_test_layout_UnionWithDtor() {
, stringify ! ( mBar ) ));
}
extern "C" {
- #[link_name = "_ZN13UnionWithDtorD1Ev"]
+ #[link_name = "\u{1}_ZN13UnionWithDtorD1Ev"]
pub fn UnionWithDtor_UnionWithDtor_destructor(this: *mut UnionWithDtor);
}
impl UnionWithDtor {
diff --git a/tests/expectations/tests/use-core.rs b/tests/expectations/tests/use-core.rs
index 6fe4a0ca..b884f4f2 100644
--- a/tests/expectations/tests/use-core.rs
+++ b/tests/expectations/tests/use-core.rs
@@ -71,7 +71,7 @@ impl Default for _bindgen_ty_1 {
fn default() -> Self { unsafe { ::core::mem::zeroed() } }
}
extern "C" {
- #[link_name = "bazz"]
+ #[link_name = "\u{1}bazz"]
pub static mut bazz: _bindgen_ty_1;
}
pub type fooFunction =
diff --git a/tests/expectations/tests/use-core_1_0.rs b/tests/expectations/tests/use-core_1_0.rs
index 1e5ef337..7caa0b0f 100644
--- a/tests/expectations/tests/use-core_1_0.rs
+++ b/tests/expectations/tests/use-core_1_0.rs
@@ -99,7 +99,7 @@ impl Clone for _bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
extern "C" {
- #[link_name = "bazz"]
+ #[link_name = "\u{1}bazz"]
pub static mut bazz: _bindgen_ty_1;
}
pub type fooFunction =
diff --git a/tests/expectations/tests/var-tracing.rs b/tests/expectations/tests/var-tracing.rs
index 3eb93b04..54ce9293 100644
--- a/tests/expectations/tests/var-tracing.rs
+++ b/tests/expectations/tests/var-tracing.rs
@@ -22,7 +22,7 @@ fn bindgen_test_layout_Bar() {
stringify ! ( m_baz ) ));
}
extern "C" {
- #[link_name = "_ZN3BarC1Ei"]
+ #[link_name = "\u{1}_ZN3BarC1Ei"]
pub fn Bar_Bar(this: *mut Bar, baz: ::std::os::raw::c_int);
}
impl Clone for Bar {
@@ -42,7 +42,7 @@ pub struct Baz {
pub _address: u8,
}
extern "C" {
- #[link_name = "_ZN3Baz3FOOE"]
+ #[link_name = "\u{1}_ZN3Baz3FOOE"]
pub static mut Baz_FOO: [Bar; 0usize];
}
#[test]
diff --git a/tests/expectations/tests/variadic-method.rs b/tests/expectations/tests/variadic-method.rs
index a68dd1c9..6ef20b76 100644
--- a/tests/expectations/tests/variadic-method.rs
+++ b/tests/expectations/tests/variadic-method.rs
@@ -5,7 +5,7 @@
extern "C" {
- #[link_name = "_Z3fooPKcz"]
+ #[link_name = "\u{1}_Z3fooPKcz"]
pub fn foo(fmt: *const ::std::os::raw::c_char, ...);
}
#[repr(C)]
@@ -21,7 +21,7 @@ fn bindgen_test_layout_Bar() {
"Alignment of " , stringify ! ( Bar ) ));
}
extern "C" {
- #[link_name = "_ZN3Bar3fooEPKcz"]
+ #[link_name = "\u{1}_ZN3Bar3fooEPKcz"]
pub fn Bar_foo(this: *mut Bar, fmt: *const ::std::os::raw::c_char, ...);
}
impl Clone for Bar {
diff --git a/tests/expectations/tests/virtual_dtor.rs b/tests/expectations/tests/virtual_dtor.rs
index 8d6d9dcd..0a9a5d09 100644
--- a/tests/expectations/tests/virtual_dtor.rs
+++ b/tests/expectations/tests/virtual_dtor.rs
@@ -22,6 +22,6 @@ impl Default for nsSlots {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN7nsSlotsD0Ev"]
+ #[link_name = "\u{1}_ZN7nsSlotsD0Ev"]
pub fn nsSlots_nsSlots_destructor(this: *mut nsSlots);
}
diff --git a/tests/expectations/tests/virtual_overloaded.rs b/tests/expectations/tests/virtual_overloaded.rs
index 90f9d928..ce9a198d 100644
--- a/tests/expectations/tests/virtual_overloaded.rs
+++ b/tests/expectations/tests/virtual_overloaded.rs
@@ -25,12 +25,12 @@ impl Default for C {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN1C8do_thingEc"]
+ #[link_name = "\u{1}_ZN1C8do_thingEc"]
pub fn C_do_thing(this: *mut ::std::os::raw::c_void,
arg1: ::std::os::raw::c_char);
}
extern "C" {
- #[link_name = "_ZN1C8do_thingEi"]
+ #[link_name = "\u{1}_ZN1C8do_thingEi"]
pub fn C_do_thing1(this: *mut ::std::os::raw::c_void,
arg1: ::std::os::raw::c_int);
}
diff --git a/tests/expectations/tests/vtable_recursive_sig.rs b/tests/expectations/tests/vtable_recursive_sig.rs
index ab2cd875..66841342 100644
--- a/tests/expectations/tests/vtable_recursive_sig.rs
+++ b/tests/expectations/tests/vtable_recursive_sig.rs
@@ -25,7 +25,7 @@ impl Default for Base {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
extern "C" {
- #[link_name = "_ZN4Base9AsDerivedEv"]
+ #[link_name = "\u{1}_ZN4Base9AsDerivedEv"]
pub fn Base_AsDerived(this: *mut ::std::os::raw::c_void) -> *mut Derived;
}
#[repr(C)]