Fix PR36268.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 8 Feb 2018 01:16:05 +0000 (01:16 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 8 Feb 2018 01:16:05 +0000 (01:16 +0000)
commit362fccf131c775a3a6379d1acb2a92adaca4aca6
tree2cd445a3c3b0714855167372745e457c28c8167f
parentc908e3f77ad425d984dea1f86a7924180da8e9fc
Fix PR36268.

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.

I will commit a patch to clang in a minute.

llvm-svn: 324551
llvm/include/llvm/IR/GlobalValue.h