From fc07a54ef674365a934a1c880f24c2e5145b25cb Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 22:14:44 -0800 Subject: [PATCH] [AsmParser] Use std::optional in AArch64AsmParser.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/Target/AArch64/AsmParser/AArch64AsmParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp index 9cf92e7..895748e 100644 --- a/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp +++ b/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -938,7 +939,7 @@ public: /// a shifted immediate by value 'Shift' or '0', or if it is an unshifted /// immediate that can be shifted by 'Shift'. template - Optional > getShiftedVal() const { + std::optional> getShiftedVal() const { if (isShiftedImm() && Width == getShiftedImmShift()) if (auto *CE = dyn_cast(getShiftedImmVal())) return std::make_pair(CE->getValue(), Width); -- 2.7.4