<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 6, 2016 at 2:07 PM, David Majnemer via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: majnemer<br>
Date: Wed Jul  6 16:07:53 2016<br>
New Revision: 274677<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=274677&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=274677&view=rev</a><br>
Log:<br>
[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage<br>
<br>
For the purpose of emitting debug info, entities with private linkage<br>
should be treated the same as internal linkage.  While this doesn't<br>
change anything in practice, it makes the code a little less confusing.<br></blockquote><div><br></div><div>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... </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Modified:<br>
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
<br>
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=274677&r1=274676&r2=274677&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=274677&r1=274676&r2=274677&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)<br>
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jul  6 16:07:53 2016<br>
@@ -2923,7 +2923,7 @@ void CGDebugInfo::EmitFunctionStart(Glob<br>
   // are emitted as CU level entities by the backend.<br>
   llvm::DISubprogram *SP = DBuilder.createFunction(<br>
       FDContext, Name, LinkageName, Unit, LineNo,<br>
-      getOrCreateFunctionType(D, FnType, Unit), Fn->hasInternalLinkage(),<br>
+      getOrCreateFunctionType(D, FnType, Unit), Fn->hasLocalLinkage(),<br>
       true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize,<br>
       TParamsArray.get(), getFunctionDeclaration(D));<br>
   Fn->setSubprogram(SP);<br>
@@ -3537,7 +3537,7 @@ llvm::DIGlobalVariable *CGDebugInfo::Col<br>
     // Use VarDecl's Tag, Scope and Line number.<br>
     GV = DBuilder.createGlobalVariable(DContext, FieldName, LinkageName, Unit,<br>
                                        LineNo, FieldTy,<br>
-                                       Var->hasInternalLinkage(), Var, nullptr);<br>
+                                       Var->hasLocalLinkage(), Var, nullptr);<br>
   }<br>
   return GV;<br>
 }<br>
@@ -3570,7 +3570,7 @@ void CGDebugInfo::EmitGlobalVariable(llv<br>
   } else {<br>
     GV = DBuilder.createGlobalVariable(<br>
         DContext, DeclName, LinkageName, Unit, LineNo, getOrCreateType(T, Unit),<br>
-        Var->hasInternalLinkage(), Var,<br>
+        Var->hasLocalLinkage(), Var,<br>
         getOrCreateStaticDataMemberDeclarationOrNull(D));<br>
   }<br>
   DeclCache[D->getCanonicalDecl()].reset(static_cast<llvm::Metadata *>(GV));<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>