summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/cxx11-extern-constexpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Emit static constexpr member as available_externally definitionMehdi Amini2017-09-051-0/+68
| | | | | | | | | | | | | | | | | | By exposing the constant initializer, the optimizer can fold many of these constructs. This is a recommit of r311857 that was reverted in r311898 because an assert was hit when building Chromium. We have to take into account that the GlobalVariable may be first created with a different type than the initializer. This can happen for example when the variable is a struct with tail padding while the initializer does not have padding. In such case, the variable needs to be destroyed an replaced with a new one with the type of the initializer. Differential Revision: https://reviews.llvm.org/D34992 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312512 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r311857 "Emit static constexpr member as available_externally definition"Hans Wennborg2017-08-281-55/+0
| | | | | | | | | | | | | It caused PR759744. > Emit static constexpr member as available_externally definition > > By exposing the constant initializer, the optimizer can fold many > of these constructs. > > Differential Revision: https://reviews.llvm.org/D34992 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311898 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit static constexpr member as available_externally definitionMehdi Amini2017-08-271-0/+55
By exposing the constant initializer, the optimizer can fold many of these constructs. Differential Revision: https://reviews.llvm.org/D34992 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311857 91177308-0d34-0410-b5e6-96231b3b80d8