mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[stable-merge] [driver] Adopt new Error/Expected API
This commit is contained in:
@@ -139,9 +139,12 @@ static bool extractLinkerFlags(const llvm::object::Binary *Bin,
|
||||
// FIXME: BinaryFileName below should instead be ld-style names for
|
||||
// object files in archives, e.g. "foo.a(bar.o)".
|
||||
if (!ChildBinary) {
|
||||
Instance.getDiags().diagnose(SourceLoc(), diag::error_open_input_file,
|
||||
BinaryFileName,
|
||||
ChildBinary.getError().message());
|
||||
llvm::handleAllErrors(
|
||||
ChildBinary.takeError(), [&](llvm::ErrorInfoBase &EI) {
|
||||
Instance.getDiags().diagnose(SourceLoc(),
|
||||
diag::error_open_input_file,
|
||||
BinaryFileName, EI.message());
|
||||
});
|
||||
return true;
|
||||
}
|
||||
if (extractLinkerFlags(ChildBinary->get(), Instance, BinaryFileName,
|
||||
|
||||
Reference in New Issue
Block a user