forked from OSchip/llvm-project
[Target] Use std::optional in CGPassBuilderOption.h (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:
parent
492a60dc0b
commit
2b158c972d
|
@ -17,6 +17,7 @@
|
|||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Target/TargetOptions.h"
|
||||
#include <optional>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -27,8 +28,8 @@ enum class CFLAAType { None, Steensgaard, Andersen, Both };
|
|||
// Not one-on-one but mostly corresponding to commandline options in
|
||||
// TargetPassConfig.cpp.
|
||||
struct CGPassBuilderOption {
|
||||
Optional<bool> OptimizeRegAlloc;
|
||||
Optional<bool> EnableIPRA;
|
||||
std::optional<bool> OptimizeRegAlloc;
|
||||
std::optional<bool> EnableIPRA;
|
||||
bool DebugPM = false;
|
||||
bool DisableVerify = false;
|
||||
bool EnableImplicitNullChecks = false;
|
||||
|
@ -50,11 +51,11 @@ struct CGPassBuilderOption {
|
|||
RunOutliner EnableMachineOutliner = RunOutliner::TargetDefault;
|
||||
RegAllocType RegAlloc = RegAllocType::Default;
|
||||
CFLAAType UseCFLAA = CFLAAType::None;
|
||||
Optional<GlobalISelAbortMode> EnableGlobalISelAbort;
|
||||
std::optional<GlobalISelAbortMode> EnableGlobalISelAbort;
|
||||
|
||||
Optional<bool> VerifyMachineCode;
|
||||
Optional<bool> EnableFastISelOption;
|
||||
Optional<bool> EnableGlobalISelOption;
|
||||
std::optional<bool> VerifyMachineCode;
|
||||
std::optional<bool> EnableFastISelOption;
|
||||
std::optional<bool> EnableGlobalISelOption;
|
||||
};
|
||||
|
||||
CGPassBuilderOption getCGPassBuilderOption();
|
||||
|
|
Loading…
Reference in New Issue