bool UsedAssumedInformation = false;
Optional<Value *> SimpleV = A.getAssumedSimplified(
V, QueryingAA, UsedAssumedInformation, AA::Interprocedural);
- if (!SimpleV.hasValue())
+ if (!SimpleV.has_value())
return PoisonValue::get(&Ty);
Value *EffectiveV = &V;
if (SimpleV.value())
const auto &SimplifiedLHS = A.getAssumedSimplified(
IRPosition::value(*LHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedLHS.hasValue())
+ if (!SimplifiedLHS.has_value())
return true;
if (!SimplifiedLHS.value())
return false;
const auto &SimplifiedRHS = A.getAssumedSimplified(
IRPosition::value(*RHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedRHS.hasValue())
+ if (!SimplifiedRHS.has_value())
return true;
if (!SimplifiedRHS.value())
return false;
const auto &SimplifiedOpV = A.getAssumedSimplified(
IRPosition::value(*OpV, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedOpV.hasValue())
+ if (!SimplifiedOpV.has_value())
return true;
if (!SimplifiedOpV.value())
return false;
const auto &SimplifiedLHS = A.getAssumedSimplified(
IRPosition::value(*LHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedLHS.hasValue())
+ if (!SimplifiedLHS.has_value())
return true;
if (!SimplifiedLHS.value())
return false;
const auto &SimplifiedRHS = A.getAssumedSimplified(
IRPosition::value(*RHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedRHS.hasValue())
+ if (!SimplifiedRHS.has_value())
return true;
if (!SimplifiedRHS.value())
return false;
const auto &SimplifiedOpV = A.getAssumedSimplified(
IRPosition::value(V, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Interprocedural);
- if (!SimplifiedOpV.hasValue())
+ if (!SimplifiedOpV.has_value())
return true;
if (!SimplifiedOpV.value())
return false;
// the same reason above.
if (!A.getAssumedSimplified(getIRPosition(), *this, UsedAssumedInformation,
AA::Interprocedural)
- .hasValue())
+ .has_value())
return ChangeStatus::UNCHANGED;
return AANoUndef::manifest(A);
}
Optional<Constant *> COpt = AA.getAssumedConstant(A);
- if (!COpt.hasValue()) {
+ if (!COpt.has_value()) {
A.recordDependence(AA, QueryingAA, DepClassTy::OPTIONAL);
return llvm::None;
}
Optional<Value *> V;
for (auto &It : Values) {
V = AA::combineOptionalValuesInAAValueLatice(V, It.getValue(), &Ty);
- if (V.hasValue() && !V.getValue())
+ if (V.has_value() && !V.getValue())
break;
}
- if (!V.hasValue())
+ if (!V.has_value())
return UndefValue::get(&Ty);
return V.getValue();
}
Type &Ty = *getAssociatedType();
Optional<Value *> SimpleV =
askOtherAA<AAValueConstantRange>(A, *this, ValIRP, Ty);
- if (SimpleV.hasValue() && !SimpleV.getValue()) {
+ if (SimpleV.has_value() && !SimpleV.getValue()) {
auto &PotentialConstantsAA = A.getAAFor<AAPotentialConstantValues>(
*this, ValIRP, DepClassTy::OPTIONAL);
if (PotentialConstantsAA.isValidState()) {
return;
}
}
- if (!SimpleV.hasValue())
+ if (!SimpleV.has_value())
return;
if (SimpleV.getValue())
const auto &SimplifiedLHS = A.getAssumedSimplified(
IRPosition::value(*LHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Intraprocedural);
- if (!SimplifiedLHS.hasValue())
+ if (!SimplifiedLHS.has_value())
return true;
if (!SimplifiedLHS.getValue())
return false;
const auto &SimplifiedRHS = A.getAssumedSimplified(
IRPosition::value(*RHS, getCallBaseContext()), *this,
UsedAssumedInformation, AA::Intraprocedural);
- if (!SimplifiedRHS.hasValue())
+ if (!SimplifiedRHS.has_value())
return true;
if (!SimplifiedRHS.getValue())
return false;
Optional<Constant *> C =
A.getAssumedConstant(*SI.getCondition(), *this, UsedAssumedInformation);
- bool NoValueYet = !C.hasValue();
+ bool NoValueYet = !C.has_value();
if (NoValueYet || isa_and_nonnull<UndefValue>(*C))
return true;
if (auto *CI = dyn_cast_or_null<ConstantInt>(*C)) {
UsedAssumedInformation, AA::Intraprocedural);
// If we are not sure about any operand we are not sure about the entire
// instruction, we'll wait.
- if (!SimplifiedOp.hasValue())
+ if (!SimplifiedOp.has_value())
return true;
if (SimplifiedOp.getValue())
Value *V = It.getValue();
Optional<Value *> CallerV = A.translateArgumentToCallSiteContent(
V, *CB, *this, UsedAssumedInformation);
- if (!CallerV.hasValue()) {
+ if (!CallerV.has_value()) {
// Nothing to do as long as no value was determined.
continue;
}