================
@@ -373,6 +373,13 @@ void ReadFunctionInfo(const uint8_t *&Data, FunctionInfo
&Info) {
endian::readNext<uint16_t, llvm::endianness::little>(Data);
Info.ResultType = std::string(Data, Data + ResultTypeLen);
Data += ResultTypeLen;
+
+ unsigned SwiftReturnOwnershipLength =
+ endian::readNext<uint16_t, llvm::endianness::little>(Data);
+ Info.SwiftReturnOwnership = std::string(reinterpret_cast<const char *>(Data),
+ reinterpret_cast<const char *>(Data)
+
+ SwiftReturnOwnershipLength);
----------------
compnerd wrote:
What do you think of making this stronger and using a `StringSwitch` to encode
this as an enumerated type? That would compress the encoded serialisation,
ensure that we catch an errant representation allowing better diagnostics, and
just make this generally less confusing to see with the string representation.
https://github.com/llvm/llvm-project/pull/118938
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits