Skip to content

Commit c1edf56

Browse files
committedNov 11, 2016
Prevent at compile time converting from Error::success() to Expected<T>
This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
1 parent 41af430 commit c1edf56

File tree

67 files changed

+212
-201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+212
-201
lines changed
 

Diff for: ‎lld/COFF/InputFiles.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void ArchiveFile::parse() {
8080
// Seen is a map from member files to boolean values. Initially
8181
// all members are mapped to false, which indicates all these files
8282
// are not read yet.
83-
Error Err;
83+
Error Err = Error::success();
8484
for (auto &Child : File->children(Err))
8585
Seen[Child.getChildOffset()].clear();
8686
if (Err)

Diff for: ‎lld/ELF/LTO.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static void diagnosticHandler(const DiagnosticInfo &DI) {
5959
}
6060

6161
static void checkError(Error E) {
62-
handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) {
62+
handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) -> Error {
6363
error(EIB.message());
6464
return Error::success();
6565
});

0 commit comments

Comments
 (0)