]> granicus.if.org Git - clang/commit
Do not emit duplicate global initializers for template static data members inside...
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Sep 2013 21:07:37 +0000 (21:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 4 Sep 2013 21:07:37 +0000 (21:07 +0000)
commit0d520f7d2efb471e568b3449f614ea90b48ad1db
tree6fcd0d92a083271b81f63e474172cd742efd81b3
parent6155fbe1f6674eb0aab98156925938fec558e335
Do not emit duplicate global initializers for template static data members inside namespaces

A quirk of AST representation leads to class template static data member
definitions being visited twice during Clang IRGen resulting in
duplicate (benign) initializers.

Discovered while investigating a possibly-related debug info bug tickled
by the duplicate emission of these members & their associated debug
info.

With thanks to Richard Smith for help investigating, understanding, and
helping with the fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189996 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCXX/static-member-variable-explicit-specialization.cpp