[cfe-commits] r153723 - in /cfe/trunk: lib/CodeGen/CGDecl.cpp lib/CodeGen/ItaniumCXXABI.cpp test/CodeGenCXX/static-init.cpp
rjmccall at apple.com
Thu Mar 29 23:22:52 PDT 2012
On Mar 29, 2012, at 11:17 PM, Chandler Carruth wrote:
> On Thu, Mar 29, 2012 at 9:25 PM, John McCall <rjmccall at apple.com> wrote:
> Author: rjmccall
> Date: Thu Mar 29 23:25:14 2012
> New Revision: 153723
> URL: http://llvm.org/viewvc/llvm-project?rev=153723&view=rev
> When emitting a static local variable in C++, handle
> the case that the variable already exists. Partly this is just
> protection against people making crazy declarations with custom
> asm labels or extern "C" names that intentionally collide with
> the manglings of such variables,
> We've started to see build failures due to this in libc-intercepting libraries. Is this expected?
> I'm still digging into the root cause, but I wanted to immediately point out that the diagnostic isn't very helpful here...
> foo/bar.cc:42:7: error: problem emitting static variable: already present as different kind of symbol
> 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?
This is an IR-gen "give up and complain instead of crashing or silently emitting broken code" diagnostic.
I'm very interested in knowing your root causes, though.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits