mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Replace llvm::Optional with std::optional
This commit is contained in:
@@ -50,7 +50,7 @@ public:
|
||||
Output getOutput(size_t I) const;
|
||||
|
||||
/// Retrieves a specific output specified by \p Kind, if it exists.
|
||||
llvm::Optional<Output> getOutput(file_types::ID Kind) const;
|
||||
std::optional<Output> getOutput(file_types::ID Kind) const;
|
||||
|
||||
/// Print this result to \p OS.
|
||||
llvm::Error print(llvm::raw_ostream &OS);
|
||||
|
||||
@@ -74,7 +74,7 @@ CompileJobCacheResult::Output CompileJobCacheResult::getOutput(size_t I) const {
|
||||
return Output{getOutputObject(I), getOutputKind(I)};
|
||||
}
|
||||
|
||||
Optional<CompileJobCacheResult::Output>
|
||||
std::optional<CompileJobCacheResult::Output>
|
||||
CompileJobCacheResult::getOutput(file_types::ID Kind) const {
|
||||
size_t Count = getNumOutputs();
|
||||
for (size_t I = 0; I < Count; ++I) {
|
||||
@@ -82,7 +82,7 @@ CompileJobCacheResult::getOutput(file_types::ID Kind) const {
|
||||
if (Kind == K)
|
||||
return Output{getOutputObject(I), Kind};
|
||||
}
|
||||
return None;
|
||||
return {};
|
||||
}
|
||||
|
||||
Error CompileJobCacheResult::print(llvm::raw_ostream &OS) {
|
||||
|
||||
Reference in New Issue
Block a user