From ffba7ee77831e70c2269be5cd8e79c8f275c1040 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 23:35:05 -0800 Subject: [PATCH] [IPO] Use std::optional in Attributor.cpp (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 --- llvm/lib/Transforms/IPO/Attributor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp index 2935127..2699852 100644 --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -54,6 +54,7 @@ #endif #include +#include #include using namespace llvm; @@ -737,7 +738,7 @@ Argument *IRPosition::getAssociatedArgument() const { // values and the ones in callbacks. If a callback was found that makes use // of the underlying call site operand, we want the corresponding callback // callee argument and not the direct callee argument. - Optional CBCandidateArg; + std::optional CBCandidateArg; SmallVector CallbackUses; const auto &CB = cast(getAnchorValue()); AbstractCallSite::getCallbackUses(CB, CallbackUses); -- 2.7.4