[PATCH] D43139: [GlobalOpts] mark linkonce_odr unnamed_addr GV as hidden
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 13:44:12 PST 2018
Steven Wu via Phabricator <reviews at reviews.llvm.org> writes:
> + // For the linkonce_odr that marked with global unnamed addr, they are safe
> + // to be hidden.
The comment sounds a bit strange. How about
// A linkonce_odr GV that is also global unnamed addr can be made hidden.
> + if (GV.hasGlobalUnnamedAddr() && GV.hasLinkOnceODRLinkage() &&
> + !GV.hasHiddenVisibility()) {
> + GV.setVisibility(GlobalValue::HiddenVisibility);
> + NumHidden++;
> + Changed = true;
> + }
> +
LGTM with that.
Thanks,
Rafael
More information about the llvm-commits
mailing list