http://llvm.org/bugs/show_bug.cgi?id=17531
Bug ID: 17531
Summary: clang fails explicit instantiate explicitly
specialized classes with visibility-hidden
Product: clang
Version: 3.3
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 11355
--> http://llvm.org/bugs/attachment.cgi?id=11355&action=edit
full code with CMakeConfig reproducing bug.
clang 3.3 and trunc fails instantiate
Case:
explicitly instantiate class which is explicitly specialized and unspecialized
declaration has missing visibility(default) then other specialized variants
will not be instantiated at all
Simplified code , please analyze attached bz2 archive wich reproducess bug.
Notice : /*VISIBILITY_DEFAULT*/
Effect: foo_plugin_base_t<THIS_TYPE,double> will not be instantiated
Effect: There are no warrnings, just missing symbols in .so
CC=clang CXX=clang++ cmake ../ -DCMAKE_CXX_FLAGS="-std=c++11
-fvisibility=hidden -fvisibility-inlines-hidden"
#define VISIBILITY_DEFAULT __attribute__ ((visibility ("default")))
template<typename THIS_TYPE, typename value_type>
struct /*VISIBILITY_DEFAULT*/ foo_plugin_base_t
{
};
template<typename THIS_TYPE>
struct VISIBILITY_DEFAULT foo_plugin_base_t<THIS_TYPE,double>
{
void may_custom_method();
};
template struct foo_plugin_base_t<foo_t<double>,double>;
template struct foo_plugin_t<foo_t<double>,double>;
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs