Skip to content

Commit

Permalink
[Analysis] Use std::optional in MLInlineAdvisor.h (NFC)
Browse files Browse the repository at this point in the history
This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
  • Loading branch information
kazutakahirata committed Nov 27, 2022
1 parent 2924a7f commit 9944625
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion llvm/include/llvm/Analysis/MLInlineAdvisor.h
Expand Up @@ -18,6 +18,7 @@
#include <deque>
#include <map>
#include <memory>
#include <optional>

namespace llvm {
class DiagnosticInfoOptimizationBase;
Expand Down Expand Up @@ -117,7 +118,7 @@ class MLInlineAdvice : public InlineAdvice {
// Make a copy of the FPI of the caller right before inlining. If inlining
// fails, we can just update the cache with that value.
const FunctionPropertiesInfo PreInlineCallerFPI;
Optional<FunctionPropertiesUpdater> FPU;
std::optional<FunctionPropertiesUpdater> FPU;
};

} // namespace llvm
Expand Down

0 comments on commit 9944625

Please sign in to comment.