mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also clang-format to fix up all the renamed #includes.
This commit is contained in:
@@ -33,7 +33,7 @@ class ASTScriptParser {
|
||||
ASTContext &Context;
|
||||
DiagnosticEngine &Diags;
|
||||
std::unique_ptr<llvm::MemoryBuffer> Buffer;
|
||||
llvm::Optional<Lexer> TheLexer;
|
||||
std::optional<Lexer> TheLexer;
|
||||
Token Tok;
|
||||
|
||||
public:
|
||||
@@ -94,10 +94,10 @@ private:
|
||||
return true;
|
||||
}
|
||||
|
||||
llvm::Optional<StringRef> consumeIfIdentifier() {
|
||||
std::optional<StringRef> consumeIfIdentifier() {
|
||||
StringRef ident;
|
||||
return consumeIfIdentifier(ident) ? llvm::Optional<StringRef>(ident)
|
||||
: llvm::None;
|
||||
return consumeIfIdentifier(ident) ? std::optional<StringRef>(ident)
|
||||
: std::nullopt;
|
||||
}
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user