From 6fd5c0b76a0c4e0ae189ac3064d1e279b66fd86c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Nov 2022 14:40:05 -0800 Subject: [PATCH] [IR] Use std::optional in InstrTypes.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 --- llvm/include/llvm/IR/InstrTypes.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/IR/InstrTypes.h b/llvm/include/llvm/IR/InstrTypes.h index da081d0..fe63344 100644 --- a/llvm/include/llvm/IR/InstrTypes.h +++ b/llvm/include/llvm/IR/InstrTypes.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -2014,7 +2015,7 @@ public: /// /// It is an error to call this for operand bundle types that may have /// multiple instances of them on the same instruction. - Optional getOperandBundle(StringRef Name) const { + std::optional getOperandBundle(StringRef Name) const { assert(countOperandBundlesOfType(Name) < 2 && "Precondition violated!"); for (unsigned i = 0, e = getNumOperandBundles(); i != e; ++i) { -- 2.7.4