diff --git a/llvm/lib/Analysis/InlineAdvisor.cpp b/llvm/lib/Analysis/InlineAdvisor.cpp --- a/llvm/lib/Analysis/InlineAdvisor.cpp +++ b/llvm/lib/Analysis/InlineAdvisor.cpp @@ -217,7 +217,7 @@ Advisor = llvm::getDevelopmentModeAdvisor(M, MAM, [&FAM, Params](CallBase &CB) { auto OIC = getDefaultInlineAdvice(CB, FAM, Params); - return OIC.hasValue(); + return OIC.has_value(); }); #endif break; diff --git a/llvm/lib/Analysis/ModelUnderTrainingRunner.cpp b/llvm/lib/Analysis/ModelUnderTrainingRunner.cpp --- a/llvm/lib/Analysis/ModelUnderTrainingRunner.cpp +++ b/llvm/lib/Analysis/ModelUnderTrainingRunner.cpp @@ -40,7 +40,7 @@ void *ModelUnderTrainingRunner::evaluateUntyped() { LastEvaluationResult = Evaluator->evaluate(); - if (!LastEvaluationResult.hasValue()) { + if (!LastEvaluationResult.has_value()) { Ctx.emitError("Error evaluating model."); return nullptr; }