summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/sections.c
Commit message (Collapse)AuthorAgeFilesLines
* Move test/CodeGen/sections.c to CodeGenCXX/sections.cppHans Wennborg2014-10-171-61/+0
| | | | | | The test was running with -xc++. Seems it wants to be a C++ file. llvm-svn: 220069
* test/CodeGen/sections.c: add tripleHans Wennborg2014-10-161-1/+1
| | | | llvm-svn: 219969
* MS Compat: mark globals emitted in read-only sections constHans Wennborg2014-10-161-0/+10
| | | | | | | | | | | | | | | | | | | | They cannot be written to, so marking them const makes sense and may improve optimisation. As a side-effect, SectionInfos has to be moved from Sema to ASTContext. It also fixes this problem, that occurs when compiling ATL: warning LNK4254: section 'ATL' (C0000040) merged into '.rdata' (40000040) with different attributes The ATL headers are putting variables in a special section that's marked read-only. However, Clang currently can't model that read-onlyness in the IR. But, by making the variables const, the section does become read-only, and the linker warning is avoided. Differential Revision: http://reviews.llvm.org/D5812 llvm-svn: 219960
* [MS-ABI] Lit fix for r205810Warren Hunt2014-04-081-1/+1
| | | | | | | On linux strings have different linkage than on windows. This patch makes the lit test more general. llvm-svn: 205812
* [MS-ABI] Add support for #pragma section and related pragmasWarren Hunt2014-04-081-26/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the msvc pragmas section, bss_seg, code_seg, const_seg and data_seg as well as support for __declspec(allocate()). Additionally it corrects semantics and adds diagnostics for __attribute__((section())) and the interaction between the attribute and the msvc pragmas and declspec. In general conflicts should now be well diganosed within and among these features. In supporting the pragmas new machinery for uniform lexing for msvc pragmas was introduced. The new machinery always lexes the entire pragma and stores it on an annotation token. The parser is responsible for parsing the pragma when the handling the annotation token. There is a known outstanding bug in this implementation in C mode. Because these attributes and pragmas apply _only_ to definitions, we process them at the time we detect a definition. Due to tentative definitions in C, we end up processing the definition late. This means that in C mode, everything that ends up in a BSS section will end up in the _last_ BSS section rather than the one that was live at the time of tentative definition, even if that turns out to be the point of actual definition. This issue is not known to impact anything as of yet because we are not aware of a clear use or use case for #pragma bss_seg but should be fixed at some point. Differential Revision=http://reviews.llvm.org/D3065#inline-16241 llvm-svn: 205810
* The emitted IR is the same, we need these flags to actually use the LLVM target.Nick Lewycky2013-10-111-0/+2
| | | | | | Mark it as requiring the x86 target. llvm-svn: 192417
* Add -fno-function-sections and -fno-data-sections. SinceNick Lewycky2013-10-111-0/+26
-f{function,data}-sections had no tests at all, add some, and verify that the -fno variants work as well. llvm-svn: 192413
OpenPOWER on IntegriCloud