diff options
author | Kazu Hirata <kazu@google.com> | 2022-11-26 14:24:38 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-11-26 14:24:38 -0800 |
commit | 07ce3b8abd5ff1467d08cf53a4d1066da79ecc7d (patch) | |
tree | c96c8717a36fce925ba7806bccfa2c819af06a92 /llvm/lib/CodeGen/BasicBlockSections.cpp | |
parent | 644159e20b9db43988b8501303e2dd332c7f9195 (diff) | |
download | llvm-07ce3b8abd5ff1467d08cf53a4d1066da79ecc7d.zip llvm-07ce3b8abd5ff1467d08cf53a4d1066da79ecc7d.tar.gz llvm-07ce3b8abd5ff1467d08cf53a4d1066da79ecc7d.tar.bz2 |
[CodeGen] Use std::optional in BasicBlockSections.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/BasicBlockSections.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BasicBlockSections.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp index 958212a..3249022 100644 --- a/llvm/lib/CodeGen/BasicBlockSections.cpp +++ b/llvm/lib/CodeGen/BasicBlockSections.cpp @@ -79,6 +79,7 @@ #include "llvm/CodeGen/TargetInstrInfo.h" #include "llvm/InitializePasses.h" #include "llvm/Target/TargetMachine.h" +#include <optional> using namespace llvm; @@ -208,7 +209,7 @@ assignSections(MachineFunction &MF, // This variable stores the section ID of the cluster containing eh_pads (if // all eh_pads are one cluster). If more than one cluster contain eh_pads, we // set it equal to ExceptionSectionID. - Optional<MBBSectionID> EHPadsSectionID; + std::optional<MBBSectionID> EHPadsSectionID; for (auto &MBB : MF) { // With the 'all' option, every basic block is placed in a unique section. |