r274677 - [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 7 16:06:17 PDT 2016
On Wed, Jul 6, 2016 at 2:07 PM, David Majnemer via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: majnemer
> Date: Wed Jul 6 16:07:53 2016
> New Revision: 274677
>
> URL: http://llvm.org/viewvc/llvm-project?rev=274677&view=rev
> Log:
> [CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage
>
> For the purpose of emitting debug info, entities with private linkage
> should be treated the same as internal linkage. While this doesn't
> change anything in practice, it makes the code a little less confusing.
>
There's no way to have anything with private linkage that isn't internal
linkage? (with attributes or the like) - I'm not at all familiar with these
things, so happy to believe it if you say that's the case...
>
> 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=274677&r1=274676&r2=274677&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jul 6 16:07:53 2016
> @@ -2923,7 +2923,7 @@ void CGDebugInfo::EmitFunctionStart(Glob
> // are emitted as CU level entities by the backend.
> llvm::DISubprogram *SP = DBuilder.createFunction(
> FDContext, Name, LinkageName, Unit, LineNo,
> - getOrCreateFunctionType(D, FnType, Unit), Fn->hasInternalLinkage(),
> + getOrCreateFunctionType(D, FnType, Unit), Fn->hasLocalLinkage(),
> true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize,
> TParamsArray.get(), getFunctionDeclaration(D));
> Fn->setSubprogram(SP);
> @@ -3537,7 +3537,7 @@ llvm::DIGlobalVariable *CGDebugInfo::Col
> // Use VarDecl's Tag, Scope and Line number.
> GV = DBuilder.createGlobalVariable(DContext, FieldName, LinkageName,
> Unit,
> LineNo, FieldTy,
> - Var->hasInternalLinkage(), Var,
> nullptr);
> + Var->hasLocalLinkage(), Var,
> nullptr);
> }
> return GV;
> }
> @@ -3570,7 +3570,7 @@ void CGDebugInfo::EmitGlobalVariable(llv
> } else {
> GV = DBuilder.createGlobalVariable(
> DContext, DeclName, LinkageName, Unit, LineNo, getOrCreateType(T,
> Unit),
> - Var->hasInternalLinkage(), Var,
> + Var->hasLocalLinkage(), Var,
> getOrCreateStaticDataMemberDeclarationOrNull(D));
> }
> DeclCache[D->getCanonicalDecl()].reset(static_cast<llvm::Metadata
> *>(GV));
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160707/174d6d1c/attachment-0001.html>
More information about the cfe-commits
mailing list