From: Kazu Hirata Date: Sat, 26 Nov 2022 06:17:26 +0000 (-0800) Subject: [GISel] Use std::optional in AArch64InstructionSelector.cpp (NFC) X-Git-Tag: upstream/17.0.6~26466 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c99c2e16b6573d31045f610150b71c7e07f5f67;p=platform%2Fupstream%2Fllvm.git [GISel] Use std::optional in AArch64InstructionSelector.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 --- diff --git a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp index f14f7c4..4a0c1e2 100644 --- a/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp @@ -47,6 +47,7 @@ #include "llvm/Pass.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include #define DEBUG_TYPE "aarch64-isel" @@ -1420,7 +1421,7 @@ static Register getTestBitReg(Register Reg, uint64_t &Bit, bool &Invert, } // Attempt to find a suitable operation with a constant on one side. - Optional C; + std::optional C; Register TestReg; switch (Opc) { default: