aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 70f1ccb..0ac42a4 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -783,7 +783,7 @@ bool LLParser::parseMDNodeID(MDNode *&Result) {
// Otherwise, create MDNode forward reference.
auto &FwdRef = ForwardRefMDNodes[MID];
- FwdRef = std::make_pair(MDTuple::getTemporary(Context, None), IDLoc);
+ FwdRef = std::make_pair(MDTuple::getTemporary(Context, std::nullopt), IDLoc);
Result = FwdRef.first.get();
NumberedMetadata[MID].reset(Result);
@@ -2132,7 +2132,7 @@ bool LLParser::parseOptionalFunctionMetadata(Function &F) {
/// ::= /* empty */
/// ::= 'align' 4
bool LLParser::parseOptionalAlignment(MaybeAlign &Alignment, bool AllowParens) {
- Alignment = None;
+ Alignment = std::nullopt;
if (!EatIfPresent(lltok::kw_align))
return false;
LocTy AlignLoc = Lex.getLoc();
@@ -2244,7 +2244,7 @@ static Optional<MemoryEffects::Location> keywordToLoc(lltok::Kind Tok) {
case lltok::kw_inaccessiblemem:
return MemoryEffects::InaccessibleMem;
default:
- return None;
+ return std::nullopt;
}
}
@@ -2259,7 +2259,7 @@ static Optional<ModRefInfo> keywordToModRef(lltok::Kind Tok) {
case lltok::kw_readwrite:
return ModRefInfo::ModRef;
default:
- return None;
+ return std::nullopt;
}
}
@@ -2274,7 +2274,7 @@ Optional<MemoryEffects> LLParser::parseMemoryAttr() {
Lex.Lex();
if (!EatIfPresent(lltok::lparen)) {
tokError("expected '('");
- return None;
+ return std::nullopt;
}
bool SeenLoc = false;
@@ -2284,7 +2284,7 @@ Optional<MemoryEffects> LLParser::parseMemoryAttr() {
Lex.Lex();
if (!EatIfPresent(lltok::colon)) {
tokError("expected ':' after location");
- return None;
+ return std::nullopt;
}
}
@@ -2295,7 +2295,7 @@ Optional<MemoryEffects> LLParser::parseMemoryAttr() {
"or access kind (none, read, write, readwrite)");
else
tokError("expected access kind (none, read, write, readwrite)");
- return None;
+ return std::nullopt;
}
Lex.Lex();
@@ -2305,7 +2305,7 @@ Optional<MemoryEffects> LLParser::parseMemoryAttr() {
} else {
if (SeenLoc) {
tokError("default access kind must be specified first");
- return None;
+ return std::nullopt;
}
ME = MemoryEffects(*MR);
}
@@ -2315,7 +2315,7 @@ Optional<MemoryEffects> LLParser::parseMemoryAttr() {
} while (EatIfPresent(lltok::comma));
tokError("unterminated memory attribute");
- return None;
+ return std::nullopt;
}
/// parseOptionalCommaAlign
@@ -2392,7 +2392,7 @@ bool LLParser::parseAllocSizeArguments(unsigned &BaseSizeArg,
"'allocsize' indices can't refer to the same parameter");
HowManyArg = HowMany;
} else
- HowManyArg = None;
+ HowManyArg = std::nullopt;
auto EndParen = Lex.getLoc();
if (!EatIfPresent(lltok::rparen))