<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 29, 2012, at 11:17 PM, Chandler Carruth wrote:</div><blockquote type="cite"><div class="gmail_quote">On Thu, Mar 29, 2012 at 9:25 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":333">Author: rjmccall<br>
Date: Thu Mar 29 23:25:14 2012<br>
New Revision: 153723<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=153723&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=153723&view=rev</a><br>
Log:<br>
When emitting a static local variable in C++, handle<br>
the case that the variable already exists.  Partly this is just<br>
protection against people making crazy declarations with custom<br>
asm labels or extern "C" names that intentionally collide with<br>
the manglings of such variables,</div></blockquote><div><br></div><div>We've started to see build failures due to this in libc-intercepting libraries. Is this expected?</div><div><br></div><div>I'm still digging into the root cause, but I wanted to immediately point out that the diagnostic isn't very helpful here... </div>
<br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">foo/bar.cc:42:7: error: problem emitting static variable: already present as different kind of symbol</blockquote>
<br>What kind of symbol was already present? Even better, can we (also) show the code that led to the symbol already being present in a note?</div>
</blockquote></div><br><div>This is an IR-gen "give up and complain instead of crashing or silently emitting broken code" diagnostic.</div><div><br></div><div>I'm very interested in knowing your root causes, though.</div><div><br></div><div>John.</div></body></html>