[llvm] 9944625 - [Analysis] Use std::optional in MLInlineAdvisor.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 27 12:18:43 PST 2022
Author: Kazu Hirata
Date: 2022-11-27T12:18:16-08:00
New Revision: 9944625e48053523876336b83fb85c67fbd89f1f
URL: https://github.com/llvm/llvm-project/commit/9944625e48053523876336b83fb85c67fbd89f1f
DIFF: https://github.com/llvm/llvm-project/commit/9944625e48053523876336b83fb85c67fbd89f1f.diff
LOG: [Analysis] Use std::optional in MLInlineAdvisor.h (NFC)
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
Added:
Modified:
llvm/include/llvm/Analysis/MLInlineAdvisor.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/MLInlineAdvisor.h b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
index 7535464e0710..23ada7fe6a25 100644
--- a/llvm/include/llvm/Analysis/MLInlineAdvisor.h
+++ b/llvm/include/llvm/Analysis/MLInlineAdvisor.h
@@ -18,6 +18,7 @@
#include <deque>
#include <map>
#include <memory>
+#include <optional>
namespace llvm {
class DiagnosticInfoOptimizationBase;
@@ -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
More information about the llvm-commits
mailing list