================
@@ -98,8 +98,11 @@ APINotesManager::loadAPINotes(FileEntryRef APINotesFile) {
// Load the binary form we just compiled.
auto Reader = APINotesReader::Create(std::move(CompiledBuffer),
SwiftVersion);
- assert(Reader && "Could not load the API notes we just generated?");
- return Reader;
+ if (!Reader) {
+ llvm::consumeError(Reader.takeError());
+ return nullptr;
+ }
+ return std::move(Reader.get());
----------------
Xazax-hun wrote:
Nit: do we need `std::move` here? I'd expect C++ to try to move the expression
that was just returned even without `std::move`.
https://github.com/llvm/llvm-project/pull/183812
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits