r230610 - CGDebugInfo: Use DIImportedEntity default constructor, NFC
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Feb 25 20:44:27 PST 2015
Author: dexonsmith
Date: Wed Feb 25 22:44:27 2015
New Revision: 230610
URL: http://llvm.org/viewvc/llvm-project?rev=230610&view=rev
Log:
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.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=230610&r1=230609&r2=230610&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Feb 25 22:44:27 2015
@@ -3321,11 +3321,11 @@ void CGDebugInfo::EmitUsingDecl(const Us
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<llvm::MDNode>(VH));
- llvm::DIImportedEntity R(nullptr);
+ llvm::DIImportedEntity R;
if (const NamespaceAliasDecl *Underlying =
dyn_cast<NamespaceAliasDecl>(NA.getAliasedNamespace()))
// This could cache & dedup here rather than relying on metadata deduping.
More information about the cfe-commits
mailing list