mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:54:49 +01:00
Update LLVM and switch to std::optional. (#2424)
LLVM's bazel build has changed a bit, so this updates the tree for that. LLVM is also moving `llvm::Optional` to match the standard API, but it seemed simpler to just switch to `std::optional`. Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
co-authored by
Jon Ross-Perkins
parent
16bbdbbdb8
commit
94cf343b05
@@ -194,7 +194,7 @@ auto PrecedenceGroup::ForType() -> PrecedenceGroup {
|
||||
}
|
||||
|
||||
auto PrecedenceGroup::ForLeading(TokenKind kind)
|
||||
-> llvm::Optional<PrecedenceGroup> {
|
||||
-> std::optional<PrecedenceGroup> {
|
||||
switch (kind) {
|
||||
case TokenKind::Star():
|
||||
return PrecedenceGroup(TermPrefix);
|
||||
@@ -211,12 +211,12 @@ auto PrecedenceGroup::ForLeading(TokenKind kind)
|
||||
return PrecedenceGroup(BitwisePrefix);
|
||||
|
||||
default:
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
auto PrecedenceGroup::ForTrailing(TokenKind kind, bool infix)
|
||||
-> llvm::Optional<Trailing> {
|
||||
-> std::optional<Trailing> {
|
||||
switch (kind) {
|
||||
// Assignment operators.
|
||||
case TokenKind::Equal():
|
||||
@@ -311,7 +311,7 @@ auto PrecedenceGroup::ForTrailing(TokenKind kind, bool infix)
|
||||
break;
|
||||
}
|
||||
|
||||
return llvm::None;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto PrecedenceGroup::GetPriority(PrecedenceGroup left, PrecedenceGroup right)
|
||||
|
||||
Reference in New Issue
Block a user