1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[Support] Rename unconvertibleErrorCode to inconvertibleErrorCode.

Based on a totally scientific, 30 second google search "in-" appears to be the
preferred prefix.

llvm-svn: 270950
This commit is contained in:
Lang Hames 2016-05-27 01:54:25 +00:00
parent 776aaf18f4
commit ddc9000626
3 changed files with 8 additions and 8 deletions

View File

@ -857,7 +857,7 @@ protected:
/// sensible conversion to std::error_code is available, as attempts to convert
/// to/from this error will result in a fatal error. (i.e. it is a programmatic
///error to try to convert such a value).
std::error_code unconvertibleErrorCode();
std::error_code inconvertibleErrorCode();
/// Helper for converting an std::error_code to a Error.
Error errorCodeToError(std::error_code EC);

View File

@ -20,7 +20,7 @@ namespace {
enum class ErrorErrorCode : int {
MultipleErrors = 1,
UnconvertibleError
InconvertibleError
};
// FIXME: This class is only here to support the transition to llvm::Error. It
@ -34,8 +34,8 @@ namespace {
switch (static_cast<ErrorErrorCode>(condition)) {
case ErrorErrorCode::MultipleErrors:
return "Multiple errors";
case ErrorErrorCode::UnconvertibleError:
return "Unconvertible error value. An error has occurred that could "
case ErrorErrorCode::InconvertibleError:
return "Inconvertible error value. An error has occurred that could "
"not be converted to a known std::error_code. Please file a "
"bug.";
}
@ -61,8 +61,8 @@ std::error_code ErrorList::convertToErrorCode() const {
*ErrorErrorCat);
}
std::error_code unconvertibleErrorCode() {
return std::error_code(static_cast<int>(ErrorErrorCode::UnconvertibleError),
std::error_code inconvertibleErrorCode() {
return std::error_code(static_cast<int>(ErrorErrorCode::InconvertibleError),
*ErrorErrorCat);
}
@ -77,7 +77,7 @@ std::error_code errorToErrorCode(Error Err) {
handleAllErrors(std::move(Err), [&](const ErrorInfoBase &EI) {
EC = EI.convertToErrorCode();
});
if (EC == unconvertibleErrorCode())
if (EC == inconvertibleErrorCode())
report_fatal_error(EC.message());
return EC;
}

View File

@ -382,7 +382,7 @@ TEST(Error, StringError) {
std::string Msg;
raw_string_ostream S(Msg);
logAllUnhandledErrors(make_error<StringError>("foo" + Twine(42),
unconvertibleErrorCode()),
inconvertibleErrorCode()),
S, "");
EXPECT_EQ(S.str(), "foo42\n") << "Unexpected StringError log result";