>> // Set visibility for definitions. NamedDecl::LinkageInfo LV = >> D->getLinkageAndVisibility(); - if (LV.visibilityExplicit() || >> !GV->hasAvailableExternallyLinkage()) - >> GV->setVisibility(GetLLVMVisibility(LV.visibility())); + >> GV->setVisibility(GetLLVMVisibility(LV.visibility())); } > > Following GCC's lead, we should only restrict the visibility of > external symbols (i.e. declarations and available_externally > definitions) if they have an explicit visibility attribute. The idea > is to allow users to build with -fvisibility=hidden and > -fvisibility-inlines-hidden without needing to carefully tag all > external declarations with default visibility. It leads to > sub-optimal code, but it's absolutely required for compatibility.
That will create a case were one file will have a default visibility available_externally constant and another will have a hidden external one. This is OK, but we would have to update the linker to accept it. Is that (changing the linker) OK? > John. Cheers, Rafael _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
