[llvm-dev] Dead (or untested?) code in the gold plugin
Davide Italiano via llvm-dev
llvm-dev at lists.llvm.org
Wed Apr 20 14:59:34 PDT 2016
If I remove this code,
diff --git a/tools/gold/gold-plugin.cpp b/tools/gold/gold-plugin.cpp
index 46a5f46..a8978d5 100644
--- a/tools/gold/gold-plugin.cpp
+++ b/tools/gold/gold-plugin.cpp
@@ -428,8 +428,6 @@ getMinVisibility(GlobalValue::VisibilityTypes A,
return A;
if (B == GlobalValue::HiddenVisibility)
return B;
- if (A == GlobalValue::ProtectedVisibility)
- return A;
return B;
}
@@ -520,15 +518,9 @@ static ld_plugin_status claim_file_hook(const
ld_plugin_input_file *file,
Res.IsLinkonceOdr &= GV->hasLinkOnceLinkage();
Res.Visibility = getMinVisibility(Res.Visibility, GV->getVisibility());
switch (GV->getVisibility()) {
- case GlobalValue::DefaultVisibility:
- sym.visibility = LDPV_DEFAULT;
- break;
case GlobalValue::HiddenVisibility:
sym.visibility = LDPV_HIDDEN;
break;
- case GlobalValue::ProtectedVisibility:
- sym.visibility = LDPV_PROTECTED;
- break;
}
}
all the tests still pass. Is it just dead, or untested?
Thanks,
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-dev
mailing list