static void setGlobalVisibility(llvm::GlobalValue *GV,
VisibilityAttr::VisibilityTypes Vis) {
// Internal definitions should always have default visibility.
- if (GV->hasInternalLinkage()) {
+ if (GV->hasLocalLinkage()) {
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
return;
}
static void setGlobalOptionVisibility(llvm::GlobalValue *GV,
LangOptions::VisibilityMode Vis) {
// Internal definitions should always have default visibility.
- if (GV->hasInternalLinkage()) {
+ if (GV->hasLocalLinkage()) {
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
return;
}