[cfe-commits] [patch] Template instantiation and visibility
Nico Weber
thakis at chromium.org
Sun Apr 22 19:25:34 PDT 2012
On Sun, Apr 22, 2012 at 5:30 PM, Rafael Espíndola
<rafael.espindola at gmail.com> wrote:
>> Sorry, make that trunk @ r155317. 155304 is my llvm revision number 9_9
>>
>> tests-MacBook-Pro-2:clang test$ ../../Release+Asserts/bin/clang --version
>> clang version 3.2 (trunk 155317) (llvm/trunk 155304)
>
> Thanks.
>
> What was missing was a similar treatment of function templates. The
> attached patch should do it. With it we now agree with gcc 4.7 about
>
> namespace t1 {
> struct HIDDEN foo {
> };
> template<class T>
> DEFAULT void bar() {}
> template DEFAULT void bar<foo>();
> }
> namespace t2 {
> struct HIDDEN foo {
> };
> template<class T>
> DEFAULT void bar() {}
> template void bar<foo>();
> }
>
> I just started a linux build of chrome with
>
> export GYP_GENERATORS='ninja'
> export GYP_DEFINES='component=shared_library clang=1 disable_nacl=1
> clang_use_chrome_plugins=0'
>
> and will start an OS X one too.
With this patch, 'net' builds correctly. More progress :-) However,
target 'printing' dies in the linking phase like so:
ld: bad codegen, pointer diff in
__ZN8printing11PrintedPageC1EiPNS_8MetafileERKN3gfx4SizeERKNS3_4RectEd
to global weak symbol
__ZTVN3gfx8RectBaseINS_4RectENS_5PointENS_4SizeENS_6InsetsEiEE for
architecture i386
(This is the same error type as in http://llvm.org/PR12001 /
http://crbug.com/113934 .)
Nico
More information about the cfe-commits
mailing list