Skip to content

Remove the last few llvm::Optional #71859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/IRGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
#include "swift/Basic/OptimizationMode.h"
#include "swift/Config.h"
#include "clang/Basic/PointerAuthOptions.h"
#include "llvm/ADT/Optional.h"
#include "llvm/IR/CallingConv.h"
// FIXME: This include is just for llvm::SanitizerCoverageOptions. We should
// split the header upstream so we don't include so much.
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/VersionTuple.h"
#include <optional>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion include/swift/Driver/Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
#include "swift/Basic/Sanitizers.h"
#include "swift/Driver/Util.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"

#include <functional>
#include <memory>
#include <optional>
#include <string>

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {

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