Simplify linkage code for static local vars.
authorEli Friedman <eli.friedman@gmail.com>
Mon, 1 Jul 2013 20:53:07 +0000 (20:53 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Mon, 1 Jul 2013 20:53:07 +0000 (20:53 +0000)
commitc48d31c31c97dc3b0314f20f2b9c93d8277bfae5
tree4b68f4a3e685d11724bebcc3022f5f020cd71618
parent48fc20a0343d426abc4ac4818b7b6895ca310617
Simplify linkage code for static local vars.

The key insight here is that weak linkage for a static local variable
should always mean linkonce_odr, because every file that needs it will
generate a definition.  We don't actually care about the precise linkage
of the parent context.  I feel a bit silly that I didn't realize this before.

llvm-svn: 185381
clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/test/CodeGenCXX/linkage.cpp