[IPO] Use std::optional in GlobalOpt.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
This commit is contained in:
Kazu Hirata 2022-11-25 23:38:32 -08:00
parent ffba7ee778
commit a5f8a36d02
1 changed files with 2 additions and 1 deletions

View File

@ -68,6 +68,7 @@
#include "llvm/Transforms/Utils/Local.h"
#include <cassert>
#include <cstdint>
#include <optional>
#include <utility>
#include <vector>
@ -2468,7 +2469,7 @@ optimizeGlobalsInModule(Module &M, const DataLayout &DL,
SmallPtrSet<const Comdat *, 8> NotDiscardableComdats;
bool Changed = false;
bool LocalChange = true;
Optional<uint32_t> FirstNotFullyEvaluatedPriority;
std::optional<uint32_t> FirstNotFullyEvaluatedPriority;
while (LocalChange) {
LocalChange = false;