mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 22:29:37 +00:00
Fix up some asserts that are within an if statement. This removes the need
for assert(0 && "text"). llvm-svn: 185396
This commit is contained in:
parent
7abfdbda73
commit
df6bd45fba
@ -1798,10 +1798,12 @@ struct LessRecordRegister {
|
|||||||
return LHSPart.second.size() < RHSPart.second.size();
|
return LHSPart.second.size() < RHSPart.second.size();
|
||||||
|
|
||||||
unsigned LHSVal, RHSVal;
|
unsigned LHSVal, RHSVal;
|
||||||
if (LHSPart.second.getAsInteger(10, LHSVal))
|
|
||||||
assert(0 && "Unable to convert LHS to integer.");
|
bool LHSFailed = LHSPart.second.getAsInteger(10, LHSVal); (void)LHSFailed;
|
||||||
if (RHSPart.second.getAsInteger(10, RHSVal))
|
assert(!LHSFailed && "Unable to convert LHS to integer.");
|
||||||
assert(0 && "Unable to convert RHS to integer.");
|
bool RHSFailed = RHSPart.second.getAsInteger(10, RHSVal); (void)RHSFailed;
|
||||||
|
assert(!RHSFailed && "Unable to convert RHS to integer.");
|
||||||
|
|
||||||
if (LHSVal != RHSVal)
|
if (LHSVal != RHSVal)
|
||||||
return LHSVal < RHSVal;
|
return LHSVal < RHSVal;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user