r181627 - Avoid patching storage class for block scope thread_local variables.
Richard Smith
richard at metafoo.co.uk
Tue May 14 13:21:31 PDT 2013
The call to hasExternalFormalLinkage in CGDecl.cpp should be to
hasExternalStorage. Consider:
namespace {
int a;
int f() {
extern int a;
return a;
}
}
Here, the 'a' inside 'f' has InternalLinkage but ExternalStorage. We
definitely don't want to emit that as an automatic-storage-duration
variable. Please also add an assert(D.hasLocalStorage()) before the call to
EmitAutoVarDecl.
On Tue, May 14, 2013 at 6:08 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> > Here is a tentative fix for review: the switch on the storage class "as
> > written" is replaced by calls to semantics-aware methods.
> > (Note: as I said previously, I am not changing the special handling of
> > SC_OpenCLWorkGroupLocal storage class.)
>
> Please include the test in the patch.
>
> > Enea.
> >
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130514/535af414/attachment.html>
More information about the cfe-commits
mailing list