[llvm] 4f7e593 - [AArch64] Use std::optional in AArch64FrameLowering.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 21:57:27 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T21:57:21-08:00
New Revision: 4f7e5930abf3ff283283b20dab8d5d651a490900
URL: https://github.com/llvm/llvm-project/commit/4f7e5930abf3ff283283b20dab8d5d651a490900
DIFF: https://github.com/llvm/llvm-project/commit/4f7e5930abf3ff283283b20dab8d5d651a490900.diff
LOG: [AArch64] Use std::optional in AArch64FrameLowering.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/AArch64/AArch64FrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
index ba325a5d030ac..3a85cfe5047d3 100644
--- a/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
@@ -228,6 +228,7 @@
#include <cassert>
#include <cstdint>
#include <iterator>
+#include <optional>
#include <vector>
using namespace llvm;
@@ -3392,7 +3393,7 @@ class TagStoreEdit {
StackOffset FrameRegOffset;
int64_t Size;
// If not None, move FrameReg to (FrameReg + FrameRegUpdate) at the end.
- Optional<int64_t> FrameRegUpdate;
+ std::optional<int64_t> FrameRegUpdate;
// MIFlags for any FrameReg updating instructions.
unsigned FrameRegUpdateFlags;
@@ -3734,7 +3735,7 @@ MachineBasicBlock::iterator tryMergeAdjacentSTG(MachineBasicBlock::iterator II,
// Find contiguous runs of tagged memory and emit shorter instruction
// sequencies for them when possible.
TagStoreEdit TSE(MBB, FirstZeroData);
- Optional<int64_t> EndOffset;
+ std::optional<int64_t> EndOffset;
for (auto &Instr : Instrs) {
if (EndOffset && *EndOffset != Instr.Offset) {
// Found a gap.
More information about the llvm-commits
mailing list