aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/ImplicitNullChecks.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-13 09:06:36 +0000
committerFangrui Song <i@maskray.me>2022-12-13 09:06:36 +0000
commit67819a72c6ba39267effe8edfc1befddc3f3f2f9 (patch)
tree9a95db915f8eded88767ac3e9c31c8db045ab505 /llvm/lib/CodeGen/ImplicitNullChecks.cpp
parent48e6ff9ad3eb1971de6d7ba12e31754781aff675 (diff)
downloadllvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.zip
llvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.tar.gz
llvm-67819a72c6ba39267effe8edfc1befddc3f3f2f9.tar.bz2
[CodeGen] llvm::Optional => std::optional
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r--llvm/lib/CodeGen/ImplicitNullChecks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
index 2bdae0e..0bdb32c 100644
--- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp
+++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp
@@ -97,11 +97,11 @@ class ImplicitNullChecks : public MachineFunctionPass {
/// If non-None, then an instruction in \p Insts that also must be
/// hoisted.
- Optional<ArrayRef<MachineInstr *>::iterator> PotentialDependence;
+ std::optional<ArrayRef<MachineInstr *>::iterator> PotentialDependence;
/*implicit*/ DependenceResult(
bool CanReorder,
- Optional<ArrayRef<MachineInstr *>::iterator> PotentialDependence)
+ std::optional<ArrayRef<MachineInstr *>::iterator> PotentialDependence)
: CanReorder(CanReorder), PotentialDependence(PotentialDependence) {
assert((!PotentialDependence || CanReorder) &&
"!CanReorder && PotentialDependence.hasValue() not allowed!");
@@ -254,7 +254,7 @@ ImplicitNullChecks::computeDependence(const MachineInstr *MI,
assert(llvm::all_of(Block, canHandle) && "Check this first!");
assert(!is_contained(Block, MI) && "Block must be exclusive of MI!");
- Optional<ArrayRef<MachineInstr *>::iterator> Dep;
+ std::optional<ArrayRef<MachineInstr *>::iterator> Dep;
for (auto I = Block.begin(), E = Block.end(); I != E; ++I) {
if (canReorder(*I, MI))