aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-12-21 01:21:33 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-12-21 01:21:33 +0000
commit2be6b72ce0d28d1934762095cdcc3ab53437e6d8 (patch)
tree5102ed47aa1daf2595eb346bc3c87813994fe074 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent77ca7f1bbe600a85d993c8fb8a47807c96922d7b (diff)
downloadllvm-2be6b72ce0d28d1934762095cdcc3ab53437e6d8.zip
llvm-2be6b72ce0d28d1934762095cdcc3ab53437e6d8.tar.gz
llvm-2be6b72ce0d28d1934762095cdcc3ab53437e6d8.tar.bz2
Don't eagerly emit a global static merged with a local extern.
When we are visiting the extern declaration of 'i' in static int i = 99; int foo() { extern int i; return i; } We should not try to handle it as if it was an function static. That is, we must consider the written storage class. Fixing this then exposes that the assert in EmitGlobalVarDeclLValue and the if leading to its call are not completely accurate. They were passing before because the second decl was marked as having external storage. I changed them to check the linkage, which I find easier to understand. Last but not least, there is something strange going on with cuda and opencl. My guess is that the linkage computation for these languages needs to be audited, but I didn't want to change that in this patch so I just updated the storage classes to keep the current behavior. Thanks to Reed Kotler for reporting this. llvm-svn: 170827
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions