]> granicus.if.org Git - clang/commit
Emit the globals, metadata, etc. associated with static variables even when
authorJohn McCall <rjmccall@apple.com>
Tue, 4 May 2010 20:45:42 +0000 (20:45 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 4 May 2010 20:45:42 +0000 (20:45 +0000)
commitfe67f3bfc09caa66ab1398c03418c35bea77caf4
tree958d625f437441ce64c4fac1ec9c43534361db92
parent27b0f510d1d4f9ed5668eec1195f04b4a74a4426
Emit the globals, metadata, etc. associated with static variables even when
they're unreachable.  This matters because (if they're POD, or if this is C)
the scope containing the variable might be reachable even if the variable
isn't.  Fixes PR7044.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103052 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGDeclCXX.cpp
test/CodeGen/staticinit.c