1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Unbreak buildbots where the debug info test was crashing due to unchecked error.

llvm-svn: 289017
This commit is contained in:
Greg Clayton 2016-12-08 02:11:03 +00:00
parent 1d88090ce6
commit acf8723073

View File

@ -51,14 +51,15 @@ Triple getHostTripleForAddrSize(uint8_t AddrSize) {
/// \returns true if there were errors, false otherwise.
template <typename T>
static bool HandleExpectedError(T &Expected) {
if (!Expected)
return false;
std::string ErrorMsg;
handleAllErrors(Expected.takeError(), [&](const llvm::ErrorInfoBase &EI) {
ErrorMsg = EI.message();
});
::testing::AssertionFailure() << "error: " << ErrorMsg;
return true;
if (!ErrorMsg.empty()) {
::testing::AssertionFailure() << "error: " << ErrorMsg;
return true;
}
return false;
}
template <uint16_t Version, class AddrType, class RefAddrType>