From 2ad85551a85980cebfcf559a9965408a06f6e001 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Thu, 26 Feb 2015 04:44:27 +0000 Subject: [PATCH] CGDebugInfo: Use DIImportedEntity default constructor, NFC Use the newly minted `DIImportedEntity` default constructor (r230609) rather than explicitly specifying `nullptr`. The latter will become ambiguous when the new debug info hierarchy is committed, since we'll have both of the following: explicit DIImportedEntity(const MDNode *); DIImportedEntity(const MDImportedEntity *); (Currently we just have the former.) A default constructor is just as clear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230610 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 19da145dde..6d78ee8754 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -3321,11 +3321,11 @@ void CGDebugInfo::EmitUsingDecl(const UsingDecl &UD) { llvm::DIImportedEntity CGDebugInfo::EmitNamespaceAlias(const NamespaceAliasDecl &NA) { if (CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo) - return llvm::DIImportedEntity(nullptr); + return llvm::DIImportedEntity(); auto &VH = NamespaceAliasCache[&NA]; if (VH) return llvm::DIImportedEntity(cast(VH)); - llvm::DIImportedEntity R(nullptr); + llvm::DIImportedEntity R; if (const NamespaceAliasDecl *Underlying = dyn_cast(NA.getAliasedNamespace())) // This could cache & dedup here rather than relying on metadata deduping. -- 2.40.0