aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp2
-rw-r--r--polly/lib/Support/ScopHelper.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index bbbb177..210f816 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1599,7 +1599,7 @@ Scop::Scop(Region &R, ScalarEvolution &ScalarEvolution, LoopInfo &LI,
DominatorTree &DT, ScopDetection::DetectionContext &DC,
OptimizationRemarkEmitter &ORE, int ID)
: IslCtx(isl_ctx_alloc(), isl_ctx_free), SE(&ScalarEvolution), DT(&DT),
- R(R), name(None), HasSingleExitEdge(R.getExitingBlock()), DC(DC),
+ R(R), name(std::nullopt), HasSingleExitEdge(R.getExitingBlock()), DC(DC),
ORE(ORE), Affinator(this, LI), ID(ID) {
// Options defaults that are different from ISL's.
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index f9dbdb9..ec9155e 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -703,7 +703,7 @@ static Optional<const MDOperand *> findNamedMetadataArg(MDNode *LoopID,
StringRef Name) {
MDNode *MD = findNamedMetadataNode(LoopID, Name);
if (!MD)
- return None;
+ return std::nullopt;
switch (MD->getNumOperands()) {
case 1:
return nullptr;
@@ -718,7 +718,7 @@ Optional<Metadata *> polly::findMetadataOperand(MDNode *LoopMD,
StringRef Name) {
MDNode *MD = findNamedMetadataNode(LoopMD, Name);
if (!MD)
- return None;
+ return std::nullopt;
switch (MD->getNumOperands()) {
case 1:
return nullptr;
@@ -733,7 +733,7 @@ static Optional<bool> getOptionalBoolLoopAttribute(MDNode *LoopID,
StringRef Name) {
MDNode *MD = findNamedMetadataNode(LoopID, Name);
if (!MD)
- return None;
+ return std::nullopt;
switch (MD->getNumOperands()) {
case 1:
return true;
@@ -755,11 +755,11 @@ llvm::Optional<int> polly::getOptionalIntLoopAttribute(MDNode *LoopID,
const MDOperand *AttrMD =
findNamedMetadataArg(LoopID, Name).value_or(nullptr);
if (!AttrMD)
- return None;
+ return std::nullopt;
ConstantInt *IntMD = mdconst::extract_or_null<ConstantInt>(AttrMD->get());
if (!IntMD)
- return None;
+ return std::nullopt;
return IntMD->getSExtValue();
}