aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-03 16:01:15 -0600
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-04 11:52:02 -0600
commit0ca43d44888885d6caf7636db91fe810e822263c (patch)
tree1b8e5ee0f5ae8e0163d551a99fcfccd33aa27456 /llvm/lib/IR/DIBuilder.cpp
parentfcf4e360ba6b5f005d2c478ca79112be7a61dacb (diff)
downloadllvm-0ca43d44888885d6caf7636db91fe810e822263c.zip
llvm-0ca43d44888885d6caf7636db91fe810e822263c.tar.gz
llvm-0ca43d44888885d6caf7636db91fe810e822263c.tar.bz2
DebugInfoMetadata: convert Optional to std::optional
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 7300693..8cb8303 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -12,13 +12,13 @@
#include "llvm/IR/DIBuilder.h"
#include "LLVMContextImpl.h"
-#include "llvm/ADT/Optional.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/CommandLine.h"
+#include <optional>
using namespace llvm;
using namespace llvm::dwarf;
@@ -229,8 +229,8 @@ DIBuilder::createImportedDeclaration(DIScope *Context, DINode *Decl,
}
DIFile *DIBuilder::createFile(StringRef Filename, StringRef Directory,
- Optional<DIFile::ChecksumInfo<StringRef>> CS,
- Optional<StringRef> Source) {
+ std::optional<DIFile::ChecksumInfo<StringRef>> CS,
+ std::optional<StringRef> Source) {
return DIFile::get(VMContext, Filename, Directory, CS, Source);
}
@@ -318,7 +318,7 @@ DIDerivedType *DIBuilder::createQualifiedType(unsigned Tag, DIType *FromTy) {
DIDerivedType *
DIBuilder::createPointerType(DIType *PointeeTy, uint64_t SizeInBits,
uint32_t AlignInBits,
- Optional<unsigned> DWARFAddressSpace,
+ std::optional<unsigned> DWARFAddressSpace,
StringRef Name, DINodeArray Annotations) {
// FIXME: Why is there a name here?
return DIDerivedType::get(VMContext, dwarf::DW_TAG_pointer_type, Name,
@@ -340,7 +340,7 @@ DIDerivedType *DIBuilder::createMemberPointerType(DIType *PointeeTy,
DIDerivedType *
DIBuilder::createReferenceType(unsigned Tag, DIType *RTy, uint64_t SizeInBits,
uint32_t AlignInBits,
- Optional<unsigned> DWARFAddressSpace) {
+ std::optional<unsigned> DWARFAddressSpace) {
assert(RTy && "Unable to create reference type");
return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, RTy,
SizeInBits, AlignInBits, 0, DWARFAddressSpace,