blob: b98d3b154566e50fbbe7849e5853e9766a8be011 [file] [log] [blame]
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -07001// Part of the Crubit project, under the Apache License v2.0 with LLVM
2// Exceptions. See /LICENSE for license information.
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
Lukasz Anforowicz19e057d2022-10-28 12:03:23 -07005// Automatically @generated Rust bindings for the following C++ target:
6// //rs_bindings_from_cc/test/golden:namespace_cc
Devin Jeanpierre6a3a2d22023-12-19 16:28:27 -08007// Features: experimental, extern_c, supported
Lukasz Anforowicz19e057d2022-10-28 12:03:23 -07008
Devin Jeanpierrec19a9a82023-01-17 14:29:32 -08009#include "support/internal/cxx20_backports.h"
10#include "support/internal/offsetof.h"
Devin Jeanpierre1d6cff52023-05-15 12:15:31 -070011#include "support/internal/sizeof.h"
Lukasz Anforowicz121338a2022-11-01 14:28:32 -070012
Jing Lu638ffa72023-09-28 07:25:59 -070013#include <cstddef>
14#include <memory>
15
Lukasz Anforowicz121338a2022-11-01 14:28:32 -070016// Public headers of the C++ library being wrapped.
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -070017#include "rs_bindings_from_cc/test/golden/namespace.h"
18
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wthread-safety-analysis"
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070021
Devin Jeanpierre1d6cff52023-05-15 12:15:31 -070022static_assert(CRUBIT_SIZEOF(struct test_namespace_bindings::S) == 4);
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070023static_assert(alignof(struct test_namespace_bindings::S) == 4);
24static_assert(CRUBIT_OFFSET_OF(i, struct test_namespace_bindings::S) == 0);
25
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -070026extern "C" void __rust_thunk___ZN23test_namespace_bindings1SC1Ev(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -070027 struct test_namespace_bindings::S* __this) {
Lukasz Anforowicz07b33902022-07-13 15:27:03 -070028 crubit::construct_at(__this);
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -070029}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070030
Devin Jeanpierre56413252022-06-02 18:48:24 -070031extern "C" void __rust_thunk___ZN23test_namespace_bindings1SC1EOS0_(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -070032 struct test_namespace_bindings::S* __this,
Lukasz Anforowicz07b33902022-07-13 15:27:03 -070033 struct test_namespace_bindings::S* __param_0) {
34 crubit::construct_at(__this, std::move(*__param_0));
Devin Jeanpierre56413252022-06-02 18:48:24 -070035}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070036
Googler7341f5e2023-01-31 14:37:12 -080037extern "C" struct test_namespace_bindings::S*
38__rust_thunk___ZN23test_namespace_bindings1SaSERKS0_(
39 struct test_namespace_bindings::S* __this,
40 const struct test_namespace_bindings::S* __param_0) {
41 return &__this->operator=(*__param_0);
42}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070043
Googler7341f5e2023-01-31 14:37:12 -080044extern "C" struct test_namespace_bindings::S*
45__rust_thunk___ZN23test_namespace_bindings1SaSEOS0_(
46 struct test_namespace_bindings::S* __this,
47 struct test_namespace_bindings::S* __param_0) {
48 return &__this->operator=(std::move(*__param_0));
49}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070050
Lukasz Anforowicz81b96872023-03-17 16:16:32 -070051extern "C" int __rust_thunk___ZN23test_namespace_bindings1fENS_1SE(
52 struct test_namespace_bindings::S* s) {
53 return test_namespace_bindings::f(std::move(*s));
54}
Rosica Dejanovskaa08b3862022-06-02 08:22:49 -070055extern "C" void
56__rust_thunk___ZN23test_namespace_bindings15inline_functionEv() {
57 test_namespace_bindings::inline_function();
58}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070059
Lukasz Anforowicz81b96872023-03-17 16:16:32 -070060extern "C" void __rust_thunk___Z8identityN23test_namespace_bindings1SE(
61 struct test_namespace_bindings::S* __return,
62 struct test_namespace_bindings::S* s) {
63 new (__return) auto(identity(std::move(*s)));
64}
65
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070066static_assert(sizeof(struct test_namespace_bindings_reopened::inner::S) == 1);
67static_assert(alignof(struct test_namespace_bindings_reopened::inner::S) == 1);
68
Rosica Dejanovska6efd17f2022-05-11 08:09:57 -070069extern "C" void __rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1Ev(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -070070 struct test_namespace_bindings_reopened::inner::S* __this) {
Lukasz Anforowicz07b33902022-07-13 15:27:03 -070071 crubit::construct_at(__this);
Rosica Dejanovska6efd17f2022-05-11 08:09:57 -070072}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070073
Rosica Dejanovska6efd17f2022-05-11 08:09:57 -070074extern "C" void
Devin Jeanpierre56413252022-06-02 18:48:24 -070075__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SC1EOS1_(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -070076 struct test_namespace_bindings_reopened::inner::S* __this,
Lukasz Anforowicz07b33902022-07-13 15:27:03 -070077 struct test_namespace_bindings_reopened::inner::S* __param_0) {
78 crubit::construct_at(__this, std::move(*__param_0));
Devin Jeanpierre56413252022-06-02 18:48:24 -070079}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070080
Googler7341f5e2023-01-31 14:37:12 -080081extern "C" struct test_namespace_bindings_reopened::inner::S*
82__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SaSERKS1_(
83 struct test_namespace_bindings_reopened::inner::S* __this,
84 const struct test_namespace_bindings_reopened::inner::S* __param_0) {
85 return &__this->operator=(*__param_0);
86}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070087
Googler7341f5e2023-01-31 14:37:12 -080088extern "C" struct test_namespace_bindings_reopened::inner::S*
89__rust_thunk___ZN32test_namespace_bindings_reopened5inner1SaSEOS1_(
90 struct test_namespace_bindings_reopened::inner::S* __this,
91 struct test_namespace_bindings_reopened::inner::S* __param_0) {
92 return &__this->operator=(std::move(*__param_0));
93}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -070094
Lukasz Anforowicz81b96872023-03-17 16:16:32 -070095extern "C" void
96__rust_thunk___ZN32test_namespace_bindings_reopened5inner1zENS0_1SE(
97 struct test_namespace_bindings_reopened::inner::S* s) {
98 test_namespace_bindings_reopened::inner::z(std::move(*s));
99}
100
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -0700101static_assert(sizeof(struct test_namespace_bindings_inline::inner::
102 StructInInlineNamespace) == 1);
103static_assert(alignof(struct test_namespace_bindings_inline::inner::
104 StructInInlineNamespace) == 1);
105
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700106extern "C" void
107__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1Ev(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -0700108 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700109 __this) {
Lukasz Anforowicz07b33902022-07-13 15:27:03 -0700110 crubit::construct_at(__this);
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700111}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -0700112
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700113extern "C" void
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700114__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceC1EOS1_(
Lukasz Anforowiczd4742ff2022-07-11 17:05:02 -0700115 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700116 __this,
Lukasz Anforowicz07b33902022-07-13 15:27:03 -0700117 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700118 __param_0) {
Lukasz Anforowicz07b33902022-07-13 15:27:03 -0700119 crubit::construct_at(__this, std::move(*__param_0));
Rosica Dejanovska4180ffe2022-06-09 06:01:05 -0700120}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -0700121
Googler7341f5e2023-01-31 14:37:12 -0800122extern "C" struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
123__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceaSERKS1_(
124 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
125 __this,
126 const struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
127 __param_0) {
128 return &__this->operator=(*__param_0);
129}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -0700130
Googler7341f5e2023-01-31 14:37:12 -0800131extern "C" struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
132__rust_thunk___ZN30test_namespace_bindings_inline5inner23StructInInlineNamespaceaSEOS1_(
133 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
134 __this,
135 struct test_namespace_bindings_inline::inner::StructInInlineNamespace*
136 __param_0) {
137 return &__this->operator=(std::move(*__param_0));
138}
Devin Jeanpierre25f9f5a2023-03-14 20:39:10 -0700139
Lukasz Anforowicz81b96872023-03-17 16:16:32 -0700140extern "C" void
141__rust_thunk___Z43useStructInInlineNamespaceWithFullQualifierN30test_namespace_bindings_inline5inner23StructInInlineNamespaceE(
142 struct test_namespace_bindings_inline::inner::StructInInlineNamespace* s) {
143 useStructInInlineNamespaceWithFullQualifier(std::move(*s));
144}
145
146extern "C" void
147__rust_thunk___Z45useStructInInlineNamespaceSkipInlineQualifierN30test_namespace_bindings_inline5inner23StructInInlineNamespaceE(
148 struct test_namespace_bindings_inline::inner::StructInInlineNamespace* s) {
149 useStructInInlineNamespaceSkipInlineQualifier(std::move(*s));
150}
151
Lukasz Anforowicz4e2e0162022-09-01 07:07:32 -0700152extern "C" void __rust_thunk___ZN4impl3fooEv() { impl::foo(); }
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -0700153
Rosica Dejanovskadd9a9032022-04-12 07:34:41 -0700154#pragma clang diagnostic pop