Skip to content

Commit 545a7ee

Browse files
authored
Merge pull request #71859 from bnbarham/remove-even-more-optional
Remove the last few llvm::Optional
2 parents bee63a3 + 1de479d commit 545a7ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
#include "swift/Basic/OptimizationMode.h"
2626
#include "swift/Config.h"
2727
#include "clang/Basic/PointerAuthOptions.h"
28-
#include "llvm/ADT/Optional.h"
2928
#include "llvm/IR/CallingConv.h"
3029
// FIXME: This include is just for llvm::SanitizerCoverageOptions. We should
3130
// split the header upstream so we don't include so much.
3231
#include "llvm/Transforms/Instrumentation.h"
3332
#include "llvm/Support/raw_ostream.h"
3433
#include "llvm/Support/VersionTuple.h"
34+
#include <optional>
3535
#include <string>
3636
#include <vector>
3737

include/swift/Driver/Driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
#include "swift/Basic/Sanitizers.h"
2626
#include "swift/Driver/Util.h"
2727
#include "llvm/ADT/DenseMap.h"
28-
#include "llvm/ADT/Optional.h"
2928
#include "llvm/ADT/StringRef.h"
3029

3130
#include <functional>
3231
#include <memory>
32+
#include <optional>
3333
#include <string>
3434

3535
namespace llvm {

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
13461346

13471347
SmallVector<llvm::Metadata *, 16> Elements;
13481348
for (auto *ElemDecl : Decl->getAllElements()) {
1349-
llvm::Optional<DebugTypeInfo> ElemDbgTy;
1349+
std::optional<DebugTypeInfo> ElemDbgTy;
13501350
if (auto ArgTy = ElemDecl->getArgumentInterfaceType()) {
13511351
// A variant case which carries a payload.
13521352
ArgTy = ElemDecl->getParentEnum()->mapTypeIntoContext(ArgTy);

0 commit comments

Comments
 (0)