This is an archive of the discontinued LLVM Phabricator instance.

Fix PR36268
ClosedPublic

Authored by espindola on Feb 7 2018, 10:24 AM.

Details

Summary

The issue is that clang was first creating a extern_weak hidden GV and then changing the linkage to external.

Once we know it is not extern_weak we know it must be dso_local.

This patch refactors the code that sets the implicit dso_local to a helper private function that is used every time we change the linkage or visibility.

Diff Detail

Event Timeline

espindola created this revision.Feb 7 2018, 10:24 AM
hans added inline comments.Feb 7 2018, 10:30 AM
llvm/include/llvm/IR/GlobalValue.h
118

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

espindola accepted this revision.Feb 7 2018, 5:20 PM

lgtm in the list

This revision is now accepted and ready to land.Feb 7 2018, 5:20 PM
espindola closed this revision.Feb 7 2018, 5:21 PM

324551 and 324552