@@ -133,32 +133,34 @@ inline void opaqueFree(void * _Nonnull p) {
133133}
134134
135135static void printSwiftResilientStorageClass (raw_ostream &os) {
136- // FIXME: mark noexcept.
137136 auto name = cxx_synthesis::getCxxOpaqueStorageClassName ();
138137 static_assert (TargetValueWitnessFlags<uint64_t >::AlignmentMask ==
139138 TargetValueWitnessFlags<uint32_t >::AlignmentMask,
140139 " alignment mask doesn't match" );
141140 os << " /// Container for an opaque Swift value, like resilient struct.\n " ;
142141 os << " class " << name << " {\n " ;
143142 os << " public:\n " ;
144- os << " inline " << name << " () : storage(nullptr) { }\n " ;
143+ os << " inline " << name << " () noexcept : storage(nullptr) { }\n " ;
145144 os << " inline " << name
146- << " (ValueWitnessTable * _Nonnull vwTable) : storage("
145+ << " (ValueWitnessTable * _Nonnull vwTable) noexcept : storage("
147146 " reinterpret_cast<char *>(opaqueAlloc(vwTable->size, (vwTable->flags &"
148147 << TargetValueWitnessFlags<uint64_t >::AlignmentMask << " ) + 1))) { }\n " ;
149148 os << " inline " << name << " (" << name
150- << " && other) : storage(other.storage) { other.storage = nullptr; }\n " ;
151- os << " inline " << name << " (const " << name << " &) = delete;\n " ;
149+ << " && other) noexcept : storage(other.storage) { other.storage = "
150+ " nullptr; }\n " ;
151+ os << " inline " << name << " (const " << name << " &) noexcept = delete;\n " ;
152152 os << " inline ~" << name
153- << " () { if (storage) { opaqueFree(static_cast<char "
153+ << " () noexcept { if (storage) { opaqueFree(static_cast<char "
154154 " * _Nonnull>(storage)); } }\n " ;
155155 os << " void operator =(" << name
156- << " && other) { auto temp = storage; storage = other.storage; "
156+ << " && other) noexcept { auto temp = storage; storage = other.storage; "
157157 " other.storage = temp; }\n " ;
158- os << " void operator =(const " << name << " &) = delete;\n " ;
159- os << " inline char * _Nonnull getOpaquePointer() { return static_cast<char "
158+ os << " void operator =(const " << name << " &) noexcept = delete;\n " ;
159+ os << " inline char * _Nonnull getOpaquePointer() noexcept { return "
160+ " static_cast<char "
160161 " * _Nonnull>(storage); }\n " ;
161- os << " inline const char * _Nonnull getOpaquePointer() const { return "
162+ os << " inline const char * _Nonnull getOpaquePointer() const noexcept { "
163+ " return "
162164 " static_cast<char * _Nonnull>(storage); }\n " ;
163165 os << " private:\n " ;
164166 os << " char * _Nullable storage;\n " ;
0 commit comments