Skip to content

Commit

Permalink
Fix enum BitcodeError to not define a zero-valued error code.
Browse files Browse the repository at this point in the history
Summary:
std::error_code assumes it isn't an error if the error code is zero.

Patch by Karl Schimpf

Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10815

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241933 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
jvoung committed Jul 10, 2015
1 parent 31a4111 commit a8043e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/llvm/Bitcode/ReaderWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace llvm {
}

const std::error_category &BitcodeErrorCategory();
enum class BitcodeError { InvalidBitcodeSignature, CorruptedBitcode };
enum class BitcodeError { InvalidBitcodeSignature = 1, CorruptedBitcode };
inline std::error_code make_error_code(BitcodeError E) {
return std::error_code(static_cast<int>(E), BitcodeErrorCategory());
}
Expand Down

0 comments on commit a8043e2

Please sign in to comment.