Don't load values out of global constants with weak
authorDuncan Sands <baldrick@free.fr>
Fri, 20 Mar 2009 21:53:29 +0000 (21:53 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 20 Mar 2009 21:53:29 +0000 (21:53 +0000)
commitab6b226978644c438a3a7768a06dcd48509d000c
tree8d574fefe86e8fa7cf23552dc4353c69bc8dec20
parentdb95fa131a229652f925794ca7a5b84e9490050b
Don't load values out of global constants with weak
linkage: the value may be replaced with something
different at link time.  (Frontends that want to
allow values to be loaded out of weak constants can
give their constants weak_odr linkage).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67407 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/SCCP.cpp
lib/Transforms/Utils/CloneFunction.cpp
test/Feature/weak_constant.ll [new file with mode: 0644]
test/FrontendC/weak_constant.c [new file with mode: 0644]