<p dir="ltr">This is still some kind of magic for me, since I can't refer to anything (even the LangRef) but Nick's comment. Is that stuff documented anywhere?</p>
<div class="gmail_quote">On Dec 29, 2013 7:23 AM, "Bill Wendling" <<a href="mailto:isanbard@gmail.com">isanbard@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks, Alexander. And sorry for creating this the long-standing issue. :-(<br>
<br>
-bw<br>
<br>
On Dec 25, 2013, at 8:46 AM, Alexander Potapenko <<a href="mailto:glider@google.com">glider@google.com</a>> wrote:<br>
<br>
> Author: glider<br>
> Date: Wed Dec 25 10:46:27 2013<br>
> New Revision: 198018<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198018&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198018&view=rev</a><br>
> Log:<br>
> [ASan] Fix the test for __asan_gen_ globals and actually fix <a href="http://llvm.org/bugs/show_bug.cgi?id=17976" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17976</a><br>
> by setting the correct linkage (as stated in the bug).<br>
><br>
> Modified:<br>
>    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
><br>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=198018&r1=198017&r2=198018&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=198018&r1=198017&r2=198018&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)<br>
> +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Wed Dec 25 10:46:27 2013<br>
> @@ -562,13 +562,13 @@ static GlobalVariable *createPrivateGlob<br>
>     Module &M, StringRef Str, bool AllowMerging) {<br>
>   Constant *StrConst = ConstantDataArray::getString(M.getContext(), Str);<br>
>   // For module-local strings that can be merged with another one we set the<br>
> -  // internal linkage and the unnamed_addr attribute.<br>
> +  // private linkage and the unnamed_addr attribute.<br>
>   // Non-mergeable strings are made linker_private to remove them from the<br>
>   // symbol table. "private" linkage doesn't work for Darwin, where the<br>
>   // "L"-prefixed globals  end up in __TEXT,__const section<br>
>   // (see <a href="http://llvm.org/bugs/show_bug.cgi?id=17976" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17976</a> for more info).<br>
>   GlobalValue::LinkageTypes linkage =<br>
> -      AllowMerging ? GlobalValue::InternalLinkage<br>
> +      AllowMerging ? GlobalValue::PrivateLinkage<br>
>                    : GlobalValue::LinkerPrivateLinkage;<br>
>   GlobalVariable *GV =<br>
>       new GlobalVariable(M, StrConst->getType(), true,<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div>