aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-11-26 14:55:08 -0800
committerKazu Hirata <kazu@google.com>2022-11-26 14:55:08 -0800
commit8a45032e5c3ad8581fd925b1ec670c82df38f8fe (patch)
tree10ef35b9b20eb7308388c9abd45bf36b859d3c54 /llvm/lib/CodeGen/MachineOperand.cpp
parent3ff6ed810381846c37be960e13d7f71596226a3f (diff)
downloadllvm-8a45032e5c3ad8581fd925b1ec670c82df38f8fe.zip
llvm-8a45032e5c3ad8581fd925b1ec670c82df38f8fe.tar.gz
llvm-8a45032e5c3ad8581fd925b1ec670c82df38f8fe.tar.bz2
[CodeGen] Use std::optional in MachineOperand.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
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index 797b3de..bc3a491 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -29,6 +29,7 @@
#include "llvm/MC/MCDwarf.h"
#include "llvm/Target/TargetIntrinsicInfo.h"
#include "llvm/Target/TargetMachine.h"
+#include <optional>
using namespace llvm;
@@ -470,7 +471,7 @@ static void printIRBlockReference(raw_ostream &OS, const BasicBlock &BB,
printLLVMNameWithoutPrefix(OS, BB.getName());
return;
}
- Optional<int> Slot;
+ std::optional<int> Slot;
if (const Function *F = BB.getParent()) {
if (F == MST.getCurrentFunction()) {
Slot = MST.getLocalSlot(&BB);