r181627 - Avoid patching storage class for block scope thread_local variables.
Richard Smith
richard at metafoo.co.uk
Wed May 15 13:25:33 PDT 2013
Please move the tests into test/CodeGenCXX, merge into existing test files,
and ensure that -emit-llvm is on the RUN: line. Maybe
cxx11-thread-local.cpp for the first test and anonymous-namespaces.cpp for
the second one?
Otherwise, LGTM, thanks!
On Wed, May 15, 2013 at 6:17 AM, Enea Zaffanella <zaffanella at cs.unipr.it>wrote:
> On 05/14/2013 10:21 PM, Richard Smith wrote:
>
>> 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.
>>
>
>
> Done as suggested (added both testcases).
>
> Enea.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130515/f0be92a0/attachment.html>
More information about the cfe-commits
mailing list