summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/c-strings.c
Commit message (Collapse)AuthorAgeFilesLines
* MS ABI: Eliminate Duplicate StringsDavid Majnemer2014-03-241-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-10/+5
| | | | llvm-svn: 204596
* CodeGen: Remove unneeded directivesDavid Majnemer2014-03-241-24/+10
| | | | | | | | | 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/+20
| | | | | | | r204562 unwittingly failed tests for some bots. Make those tests work with both the Itanium and MS ABIs. llvm-svn: 204566
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-5/+5
| | | | | | tests fail. llvm-svn: 188447
* Add SystemZ supportUlrich Weigand2013-05-061-3/+10
| | | | | | | | | | | | | | This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. llvm-svn: 181211
* FileCheck'ize testDmitri Gribenko2013-01-251-7/+26
| | | | llvm-svn: 173396
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-4/+4
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* make sure the size of constant arrays is respectedNuno Lopes2008-08-131-1/+3
| | | | llvm-svn: 54769
* Add GetAddrOfConstantCString methodDaniel Dunbar2008-08-131-0/+34
- Returns addr of constant for argument + '\0'. - I couldn't think of a better name. - Move appropriate users of GetAddrOfConstantString to this. Rename getStringForStringLiteral to GetStringForStringLiteral. Add GetAddrOfConstantStringFromLiteral - This combines GetAddrOfConstantString and GetStringForStringLiteral. This method can be, but is not yet, more efficient. Change GetAddrOfConstantString to not add terminating '\0' - <rdar://problem/6140956> llvm-svn: 54768
OpenPOWER on IntegriCloud