aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 06015a9..27bbbfc 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -2642,7 +2642,7 @@ void CGDebugInfo::addHeapAllocSiteMetadata(llvm::CallBase *CI,
return;
llvm::MDNode *node;
if (AllocatedTy->isVoidType())
- node = llvm::MDNode::get(CGM.getLLVMContext(), std::nullopt);
+ node = llvm::MDNode::get(CGM.getLLVMContext(), {});
else
node = getOrCreateType(AllocatedTy, getOrCreateFile(Loc));
@@ -4324,8 +4324,7 @@ llvm::DISubroutineType *CGDebugInfo::getOrCreateFunctionType(const Decl *D,
!CGM.getCodeGenOpts().EmitCodeView))
// Create fake but valid subroutine type. Otherwise -verify would fail, and
// subprogram DIE will miss DW_AT_decl_file and DW_AT_decl_line fields.
- return DBuilder.createSubroutineType(
- DBuilder.getOrCreateTypeArray(std::nullopt));
+ return DBuilder.createSubroutineType(DBuilder.getOrCreateTypeArray({}));
if (const auto *Method = dyn_cast<CXXMethodDecl>(D))
return getOrCreateMethodType(Method, F);