summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/CFStrings.c
Commit message (Collapse)AuthorAgeFilesLines
* Reland "[Clang][CodeGen][ObjC]: Fix CoreFoundation on ELF with ↵Kristina Brooks2018-09-251-59/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-fconstant-cfstrings`" Relanding rL342883 with more fragmented tests to test ELF-specific section emission separately from broad-scope CFString tests. Now this tests the following separately 1). CoreFoundation builds and linkage for ELF while building it. 2). CFString ELF section emission outside CF in assembly output. 3). Broad scope `cfstring3.c` tests which cover all object formats at bitcode level and assembly level (including ELF). This fixes non-bridged CoreFoundation builds on ELF targets that use -fconstant-cfstrings. The original changes from differential for a similar patch to PE/COFF (https://reviews.llvm.org/D44491) did not check for an edge case where the global could be a constant which surfaced as an issue when building for ELF because of different linkage semantics. This patch addresses several issues with crashes related to CF builds on ELF as well as improves data layout by ensuring string literals that back the actual CFConstStrings end up in .rodata in line with Mach-O. Change itself tested with CoreFoundation on Linux x86_64 but should be valid for BSD-like systems as well that use ELF as the native object format. Differential Revision: https://reviews.llvm.org/D52344 llvm-svn: 343038
* Revert "rL342883: [Clang][CodeGen][ObjC]: Fix CoreFoundation on ELF with ↵Kristina Brooks2018-09-241-2/+2
| | | | | | | | `-fconstant-cfstrings`." Seems to be causing buildbot failures, need to look into it. llvm-svn: 342893
* [CFString][ELF] Fix a missed test causing buildbot failures from 342883.Kristina Brooks2018-09-241-2/+2
| | | | | | Accidetanlly forgot to update it, big sorry. llvm-svn: 342890
* CodeGen: try harder to make the CFString structure RWSaleem Abdulrasool2016-07-291-10/+18
| | | | | | | | The previous change was insufficient to mark the content as read-write as the structure itself was marked constant. Adjust this and add tests to ensure that the section is marked appropriately as being read-write. llvm-svn: 277200
* CodeGen: tweak CFString section for COFF, ELFSaleem Abdulrasool2016-07-091-6/+6
| | | | | | | | | Place the structure data into `cfstring`. This both isolates the structures to permit coalescing in the future (by the linker) as well as ensures that it doesnt get marked as read-only data. The structures themselves are not read-only, only the string contents. llvm-svn: 274956
* test: add explicit targets for some testsSaleem Abdulrasool2016-05-301-0/+2
| | | | | | | These tests currently expect MachO section names and do not provide a target. Explicitly provide one. llvm-svn: 271212
* CodeGen: tweak CFConstantStrings for COFF and ELFSaleem Abdulrasool2016-05-301-0/+49
Adjust the constant CFString emission to emit into more appropriate sections on ELF and COFF targets. It would previously try to use MachO section names irrespective of the file format. llvm-svn: 271211
OpenPOWER on IntegriCloud