summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/string-literal-short-wstring.c
Commit message (Collapse)AuthorAgeFilesLines
* Set dso_local on string literals.Rafael Espindola2018-03-201-2/+2
| | | | llvm-svn: 328040
* Driver: hoist the `wchar_t` handling to the driverSaleem Abdulrasool2017-10-061-2/+2
| | | | | | | | | | | | | | | | Move the logic for determining the `wchar_t` type information into the driver. Rather than passing the single bit of information of `-fshort-wchar` indicate to the frontend the desired type of `wchar_t` through a new `-cc1` option of `-fwchar-type` and indicate the signedness through `-f{,no-}signed-wchar`. This replicates the current logic which was spread throughout Basic into the `RenderCharacterOptions`. Most of the changes to the tests are to ensure that the frontend uses the correct type. Add a new test set under `test/Driver/wchar_t.c` to ensure that we calculate the proper types for the various cases. llvm-svn: 315126
* [Hexagon] Xfail two tests that fail due to over-aligning arraysKrzysztof Parzyszek2015-12-141-0/+4
| | | | llvm-svn: 255510
* MS ABI: Eliminate Duplicate StringsDavid Majnemer2014-03-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | COFF doesn't have mergeable sections so LLVM/clang's normal tactics for string deduplication will not have any effect. To remedy this we place each string inside it's own section and mark the section as IMAGE_COMDAT_SELECT_ANY. However, we can only do this if the string has an external name that we can generate from it's contents. To be compatible with MSVC, we must use their scheme. Otherwise identical strings in translation units from clang may not be deduplicated with translation units in MSVC. This fixes PR18248. N.B. We will not attempt to do anything with a string literal which is not of type 'char' or 'wchar_t' because their compiler does not support unicode string literals as of this date. Further, we avoid doing this if either -fwritable-strings or -fsanitize=address are present. This reverts commit r204596. llvm-svn: 204675
* Revert r204562,204566,204586,204587 as they broke ASan on WindowsTimur Iskhodzhanov2014-03-241-6/+3
| | | | llvm-svn: 204596
* CodeGen: Remove unneeded directivesDavid Majnemer2014-03-241-11/+6
| | | | | | | | | Use two check-prefix patterns per FileCheck invocation for these tests, this cleanly removes redundant CHECK directives. Thanks to Richard Smith for the idea! llvm-svn: 204587
* CodeGen: Make string tests exercise the MS ABIDavid Majnemer2014-03-231-1/+9
| | | | | | | r204562 unwittingly failed tests for some bots. Make those tests work with both the Itanium and MS ABIs. llvm-svn: 204566
* Add and update tests for character literalsSeth Cantrell2012-01-181-11/+0
| | | | llvm-svn: 148392
* Fix the representation of wide strings in the AST and IR so that it uses the ↵Eli Friedman2011-11-011-2/+2
| | | | | | | | | | native representation of integers for the elements. This fixes a bunch of nastiness involving treating wide strings as a series of bytes. Patch by Seth Cantrell. llvm-svn: 143417
* Make constant aggregate constant initializers private linkage.Eric Christopher2011-08-241-1/+1
| | | | | | | | | After talking with John making this the case for all of these is the right way to go. Fixes rdar://9804564 and PR10414 llvm-svn: 138418
* Add unnamed_addr to internal globals which are only used as an operand to ↵Eli Friedman2011-05-271-1/+1
| | | | | | memcpy. (Spotted by looking at IR.) llvm-svn: 132226
* Add unnamed_addr when creating artificial string globals. For example, inRafael Espindola2011-01-101-2/+2
| | | | | | | | | static const char foo[] = "foo"; static const char *bar = "bar"; the global created to hold "bar" will have it, but foo will not. llvm-svn: 123192
* Add support for UCNs for character literalsNico Weber2010-10-091-3/+32
| | | | llvm-svn: 116129
* Add support for 4-byte UCNs like \U12345678. Warn about UCNs in c90 mode.Nico Weber2010-10-061-0/+14
llvm-svn: 115743
OpenPOWER on IntegriCloud