We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile the attachment with
clang++ -c repro.ii -fvisibility=hidden
then run nm -m repro.o.
nm -m repro.o
gcc4.2 and clang prior to r156821 resulted in:
0000000000000000 (__DATA,__data) external __ZN18DeviceDataProviderI9RadioDataE17factory_function_E (undefined) external __ZN18DeviceDataProviderI9RadioDataE22DefaultFactoryFunctionEv
clang with r156821 results in:
0000000000000000 (__DATA,__data) private external __ZN18DeviceDataProviderI9RadioDataE17factory_function_E (undefined) external __ZN18DeviceDataProviderI9RadioDataE22DefaultFactoryFunctionEv
This breaks the chromium component build, target 'content_unittest' no longer links.
$ cat repro.ii
struct attribute((visibility("default"))) RadioData {};
class attribute((visibility("default"))) DeviceDataProviderImplBaseHack {};
template class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack {};
template class DeviceDataProvider { typedef DeviceDataProviderImplBase* (ImplFactoryFunction)(void); attribute((visibility("default"))) static DeviceDataProviderImplBase DefaultFactoryFunction(); attribute((visibility("default"))) static ImplFactoryFunction factory_function_; };
template<> DeviceDataProvider::ImplFactoryFunction DeviceDataProvider::factory_function_ = DefaultFactoryFunction;
The text was updated successfully, but these errors were encountered:
reduces to:
template struct foo { attribute((visibility("default"))) static int bar; };
template int foo::bar;
int f() { return foo::bar; }
Sorry, something went wrong.
Fixed in r156897.
Verified. Thanks!
No branches or pull requests
Extended Description
Compile the attachment with
clang++ -c repro.ii -fvisibility=hidden
then run
nm -m repro.o
.gcc4.2 and clang prior to r156821 resulted in:
0000000000000000 (__DATA,__data) external __ZN18DeviceDataProviderI9RadioDataE17factory_function_E
(undefined) external __ZN18DeviceDataProviderI9RadioDataE22DefaultFactoryFunctionEv
clang with r156821 results in:
0000000000000000 (__DATA,__data) private external __ZN18DeviceDataProviderI9RadioDataE17factory_function_E
(undefined) external __ZN18DeviceDataProviderI9RadioDataE22DefaultFactoryFunctionEv
This breaks the chromium component build, target 'content_unittest' no longer links.
$ cat repro.ii
struct attribute((visibility("default"))) RadioData {};
class attribute((visibility("default"))) DeviceDataProviderImplBaseHack {};
template
class DeviceDataProviderImplBase : public DeviceDataProviderImplBaseHack {};
template
class DeviceDataProvider {
typedef DeviceDataProviderImplBase* (ImplFactoryFunction)(void);
attribute((visibility("default"))) static DeviceDataProviderImplBase DefaultFactoryFunction();
attribute((visibility("default"))) static ImplFactoryFunction factory_function_;
};
template<>
DeviceDataProvider::ImplFactoryFunction
DeviceDataProvider::factory_function_ = DefaultFactoryFunction;
The text was updated successfully, but these errors were encountered: