[PATCH] D43029: Fix PR36268

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 11:25:19 PST 2018


Hans Wennborg via Phabricator <reviews at reviews.llvm.org> writes:

> hans added inline comments.
>
>
> ================
> Comment at: llvm/include/llvm/IR/GlobalValue.h:118
> +        (!hasDefaultVisibility() && !hasExternalWeakLinkage()))
> +      setDSOLocal(true);
> +  }
> ----------------
> Can this flip back and forth? That is, if setDSOLocal(true) was set before, do we need to handle the else-branch here and do setDSOLocal(false)?

I don't think we can. The main reason for having dso_local is to allow
local access to a GV that we would no normally access that way.

Given that it is reasonable for LLVM to set dso_local in GVs the
existing code would access as local, but to clear it would invalidate
user changes.

Cheers,
Rafael


More information about the llvm-commits mailing list