]> granicus.if.org Git - clang/commit
Reapply r231508 "CodeGen: Emit constant temporaries into read-only globals."
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 7 Mar 2015 13:37:13 +0000 (13:37 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 7 Mar 2015 13:37:13 +0000 (13:37 +0000)
commit9e51c85a582963e272b3462d5f40752aff2830ab
treec4ac9f2e46c4c3359a2a3a2d45e0fd787fd0137b
parent8cd8681110bbfc2f2009505304db5a3300adbf61
Reapply r231508 "CodeGen: Emit constant temporaries into read-only globals."

I disabled putting the new global into the same COMDAT as the function for now.
There's a fundamental problem when we inline references to the global but still
have the global in a COMDAT linked to the inlined function. Since this is only
an optimization there may be other versions of the COMDAT around that are
missing the new global and hell breaks loose at link time.

I hope the chromium build doesn't break this time :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231564 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/compound-literals.cpp
test/CodeGenCXX/cxx0x-initializer-array.cpp
test/CodeGenCXX/cxx0x-initializer-references.cpp
test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp