[llvm] 9d7faff - [Hexagon] Use std::optional in HexagonFrameLowering.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 22:49:18 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T22:49:13-08:00
New Revision: 9d7faffa108c70507177d33172294c3a8ab817d9
URL: https://github.com/llvm/llvm-project/commit/9d7faffa108c70507177d33172294c3a8ab817d9
DIFF: https://github.com/llvm/llvm-project/commit/9d7faffa108c70507177d33172294c3a8ab817d9.diff
LOG: [Hexagon] Use std::optional in HexagonFrameLowering.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/Hexagon/HexagonFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index 2f7f1c1d6368f..1e36e641991e0 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -60,6 +60,7 @@
#include <iterator>
#include <limits>
#include <map>
+#include <optional>
#include <utility>
#include <vector>
@@ -989,7 +990,7 @@ bool HexagonFrameLowering::updateExitPaths(MachineBasicBlock &MBB,
return ReachedExit;
}
-static Optional<MachineBasicBlock::iterator>
+static std::optional<MachineBasicBlock::iterator>
findCFILocation(MachineBasicBlock &B) {
// The CFI instructions need to be inserted right after allocframe.
// An exception to this is a situation where allocframe is bundled
More information about the llvm-commits
mailing list