[llvm] 96cb34a - [AsmParser] Use std::optional in AMDGPUAsmParser.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 22:36:43 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T22:36:37-08:00
New Revision: 96cb34ab5a438a88873f513ed4532945e8d407cc
URL: https://github.com/llvm/llvm-project/commit/96cb34ab5a438a88873f513ed4532945e8d407cc
DIFF: https://github.com/llvm/llvm-project/commit/96cb34ab5a438a88873f513ed4532945e8d407cc.diff
LOG: [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
Added:
Modified:
llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index 974e23155be1b..7bb1ac3bfc75f 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 <optional>
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<unsigned> ExplicitUserSGPRCount;
+ std::optional<unsigned> ExplicitUserSGPRCount;
bool ReserveVCC = true;
bool ReserveFlatScr = true;
Optional<bool> EnableWavefrontSize32;
More information about the llvm-commits
mailing list