mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-05 01:56:16 +00:00
Fix enum BitcodeError to not define a zero-valued error code.
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
This commit is contained in:
parent
31a4111f50
commit
a8043e2f82
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user