[llvm-dev] Dead (or untested?) code in the gold plugin

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 25 10:25:40 PDT 2016


On Sun, Apr 24, 2016 at 2:51 PM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> 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;
>
> This part is actually dead since we have initialized sym.visibility to
> LDPV_DEFAULT just before the switch. I would still keep it just to
> have a fully covered switch. Maybe delete just the assignment?
>

r267429

> I have added tests for the other code parts.
>

Thank you.


-- 
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