From: Kazu Hirata Date: Sat, 26 Nov 2022 06:36:37 +0000 (-0800) Subject: [AsmParser] Use std::optional in AMDGPUAsmParser.cpp (NFC) X-Git-Tag: upstream/17.0.6~26462 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=96cb34ab5a438a88873f513ed4532945e8d407cc;p=platform%2Fupstream%2Fllvm.git [AsmParser] Use std::optional in AMDGPUAsmParser.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/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp index 974e2315..7bb1ac3 100644 --- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp +++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp @@ -38,6 +38,7 @@ #include "llvm/Support/MachineValueType.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/TargetParser.h" +#include using namespace llvm; using namespace llvm::AMDGPU; @@ -4990,7 +4991,7 @@ bool AMDGPUAsmParser::ParseDirectiveAMDHSAKernel() { // Track if the asm explicitly contains the directive for the user SGPR // count. - Optional ExplicitUserSGPRCount; + std::optional ExplicitUserSGPRCount; bool ReserveVCC = true; bool ReserveFlatScr = true; Optional EnableWavefrontSize32;