aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-03 11:06:12 -0600
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-03 12:08:47 -0600
commit8c7c20f033c7036a8bf231ca6f9e02172cb581f0 (patch)
tree5980d2a7545070fb3c37df39dbb563b98158a778 /llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
parentd98c17271265f54a5c6ad07b2094f9b5bf3a34cc (diff)
downloadllvm-8c7c20f033c7036a8bf231ca6f9e02172cb581f0.zip
llvm-8c7c20f033c7036a8bf231ca6f9e02172cb581f0.tar.gz
llvm-8c7c20f033c7036a8bf231ca6f9e02172cb581f0.tar.bz2
Convert Optional<CodeModel> to std::optional<CodeModel>
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 9b28310..f0ae664 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -46,6 +46,7 @@
#include "llvm/Transforms/Scalar.h"
#include <cassert>
#include <memory>
+#include <optional>
#include <string>
using namespace llvm;
@@ -260,9 +261,9 @@ static Reloc::Model getEffectiveRelocModel(const Triple &TT,
return Reloc::Static;
}
-static CodeModel::Model getEffectivePPCCodeModel(const Triple &TT,
- Optional<CodeModel::Model> CM,
- bool JIT) {
+static CodeModel::Model
+getEffectivePPCCodeModel(const Triple &TT, std::optional<CodeModel::Model> CM,
+ bool JIT) {
if (CM) {
if (*CM == CodeModel::Tiny)
report_fatal_error("Target does not support the tiny CodeModel", false);
@@ -325,7 +326,7 @@ PPCTargetMachine::PPCTargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Optional<Reloc::Model> RM,
- Optional<CodeModel::Model> CM,
+ std::optional<CodeModel::Model> CM,
CodeGenOpt::Level OL, bool JIT)
: LLVMTargetMachine(T, getDataLayoutString(TT), TT, CPU,
computeFSAdditions(FS, OL, TT), Options,