summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/init-priority-attr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use comdats to avoid double initialization of weak dataReid Kleckner2014-05-231-1/+4
| | | | | | | | | | | | | | | | | Initializers of global data that can appear multiple TUs (static data members of class templates or __declspec(selectany) data) are now in a comdat group keyed on the global variable being initialized. On non-Windows platforms, this is a code size and startup time optimization. On Windows, this is necessary for ABI compatibility with MSVC. Fixes PR16959. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3811 llvm-svn: 209555
* Include translation unit filename in global ctor symbol names.Nico Weber2014-05-061-2/+2
| | | | | | | | | | | | | | | | | This makes it easier to see where a global ctor comes from, and it also makes ASan's init order analyzer output easier to understand. gcc does this too, but only in -fPIC mode for some reason. Don't do this for constructors with explicit init priority. Also prepend "sub_" before the 'I', that way regular constructors stay lexicographically after symbols with init priority (because ord('s') > ord('I')). gold seems to ignore the name of constructor symbols, and ld only looks at the symbol if it includes an init priority, which this patch doesn't change. Before: __GLOBAL_I_a Now: __GLOBAL_sub_I_myfile.cc llvm-svn: 208128
* test case hygiene.Benjamin Kramer2014-01-111-7/+10
| | | | llvm-svn: 199017
* Implement codegen for init_priority attribute properly - make sure itAnton Korobeynikov2012-11-061-0/+46
works between the modules. No functionality change on Darwin/Windows. This fixes PR11480. llvm-svn: 167496
OpenPOWER on IntegriCloud