[llvm] r241933 - Fix enum BitcodeError to not define a zero-valued error code.
Jan Wen Voung
jvoung at google.com
Fri Jul 10 12:46:16 PDT 2015
Author: jvoung
Date: Fri Jul 10 14:46:16 2015
New Revision: 241933
URL: http://llvm.org/viewvc/llvm-project?rev=241933&view=rev
Log:
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
Modified:
llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
Modified: llvm/trunk/include/llvm/Bitcode/ReaderWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/ReaderWriter.h?rev=241933&r1=241932&r2=241933&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Bitcode/ReaderWriter.h (original)
+++ llvm/trunk/include/llvm/Bitcode/ReaderWriter.h Fri Jul 10 14:46:16 2015
@@ -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());
}
More information about the llvm-commits
mailing list