commit | 3ccbfc34c0bdc18d259f4d4067616fe61e0876d8 | [log] [tgz] |
---|---|---|
author | Kazu Hirata <kazu@google.com> | Sat Nov 26 14:44:54 2022 -0800 |
committer | Kazu Hirata <kazu@google.com> | Sat Nov 26 14:44:54 2022 -0800 |
tree | 6b4ed2d173499fa9579eb8851dddf8b7839b5a0c | |
parent | 4531b61208eb723bdd9533236e14b349ee0ca22d [diff] [blame] |
[GlobalISel] Use std::optional in LegalizerHelper.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
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index 6ea4f6c..b0bba68 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
@@ -34,6 +34,7 @@ #include "llvm/Support/raw_ostream.h" #include "llvm/Target/TargetMachine.h" #include <numeric> +#include <optional> #define DEBUG_TYPE "legalizer" @@ -1842,7 +1843,7 @@ LLT WideTy) { unsigned Opcode; unsigned ExtOpcode; - Optional<Register> CarryIn; + std::optional<Register> CarryIn; switch (MI.getOpcode()) { default: llvm_unreachable("Unexpected opcode!");