mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[NFC] Remove some GCC warning from c9e93c84f61400d1aac7d195a0578e80bc48c69a
This commit is contained in:
parent
0ba63b8a56
commit
59261f7b76
@ -229,8 +229,8 @@ bool llvm::hasAttributeInAssume(CallInst &AssumeCI, Value *IsOn,
|
||||
Lookup->Tag->getKey() != AttrName)
|
||||
return false;
|
||||
if (IsOn) {
|
||||
if (Lookup->End - Lookup->Begin < BOIE_WasOn)
|
||||
return false;
|
||||
assert((Lookup->End - Lookup->Begin > BOIE_WasOn) &&
|
||||
"missing argument of attribute");
|
||||
while (true) {
|
||||
if (Lookup == Assume.bundle_op_info_end() ||
|
||||
Lookup->Tag->getKey() != AttrName)
|
||||
|
@ -51,8 +51,9 @@ void AssertMatchesExactlyAttributes(CallInst *Assume, Value *WasOn,
|
||||
#include "llvm/IR/Attributes.inc"
|
||||
}) {
|
||||
bool ShouldHaveAttr = Reg.match(Attr, &Matches) && Matches[0] == Attr;
|
||||
if (ShouldHaveAttr != hasAttributeInAssume(*Assume, WasOn, Attr))
|
||||
if (ShouldHaveAttr != hasAttributeInAssume(*Assume, WasOn, Attr)) {
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,10 +72,12 @@ void AssertHasTheRightValue(CallInst *Assume, Value *WasOn,
|
||||
AssumeQuery::Lowest);
|
||||
bool ResultHigh = hasAttributeInAssume(*Assume, WasOn, Kind, &ArgValHigh,
|
||||
AssumeQuery::Highest);
|
||||
if (ResultLow != ResultHigh)
|
||||
if (ResultLow != ResultHigh || ResultHigh == false) {
|
||||
ASSERT_TRUE(false);
|
||||
if (ArgValLow != Value || ArgValLow != ArgValHigh)
|
||||
ASSERT_EQ(ArgValLow, Value);
|
||||
}
|
||||
if (ArgValLow != Value || ArgValLow != ArgValHigh) {
|
||||
ASSERT_TRUE(false);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(AssumeQueryAPI, Basic) {
|
||||
|
Loading…
Reference in New Issue
Block a user