summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/darwin-string-literals.c
Commit message (Collapse)AuthorAgeFilesLines
* [PPC] Remove Darwin support from POWER backend.Kit Barton2018-08-271-8/+0
| | | | | | | | | | | | | | This patch removes uses of the Darwin ABI for PowerPC related test cases. This is the first step in removing Darwin support from the POWER backend. clang/test/CodeGen/darwin-ppc-varargs.c was deleted because it was a darwin/ppc specific test case. All other tests were updated to remove the darwin/ppc specific invocation. Phabricator Review: https://reviews.llvm.org/D50989. llvm-svn: 340770
* Changed renaming of local symbols by inserting a dot vefore the numeric suffixSunil Srivastava2015-05-121-6/+6
| | | | | | | details in http://reviews.llvm.org/D9483 goes with llvm checkin r237150 llvm-svn: 237151
* Use private linkage for utf-16 objc strings too.Rafael Espindola2014-01-211-4/+4
| | | | llvm-svn: 199709
* Now that r199688 avoids the real issue, use private linkage for objc strings.Rafael Espindola2014-01-211-2/+2
| | | | llvm-svn: 199705
* Give explicit sections for string constants used in NSStrings.Rafael Espindola2014-01-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without them they can be merged with non unnamed_addr constants during LTO. The resulting constant is not unnamed_addr and goes in a different section, which causes ld64 to crash. A testcase that would crash before: * file1.mm: void g(id notification) { [notification valueForKey:@"name"]; } * file2.cpp: extern const char js_name_str[] = "name"; * file3.cpp extern bool JS_GetProperty(const char *name); extern const char js_name_str[]; bool js_ReportUncaughtException() { JS_GetProperty(js_name_str); } run clang file1.mm -o file1.o -c -w -emit-llvm clang file2.cpp -o file2.o -c -w -emit-llvm clang file3.cpp -o file3.o -c -w ld -dylib -o XUL file1.o file2.o file3.o -undefined dynamic_lookup. llvm-svn: 199688
* Fix FileCheck --check-prefix lines.Tim Northover2013-08-121-2/+2
| | | | | | | | | | Various tests had sprung up over the years which had --check-prefix=ABC on the RUN line, but "CHECK-ABC:" later on. This happened to work before, but was strictly incorrect. FileCheck is getting stricter soon though. Patch by Ron Ofir. llvm-svn: 188174
* The UTF16 string referenced by a CFString should go into the __TEXT,__ustringBill Wendling2012-03-301-2/+5
| | | | | | | | | | | | | section. A 'normal' string will go into the __TEXT,__const section, but this isn't good for UTF16 strings. The __ustring section allows for coalescing, among other niceties (such as allowing the linker to easily split up strings). Instead of outputting the UTF16 string as a series of bytes, output it as a series of shorts. The back-end will then nicely place the UTF16 string into the correct section, because it's a mensch. <rdar://problem/10655949> llvm-svn: 153710
* Switch from internal to linker_private linkage, it is sufficient to please ↵Rafael Espindola2011-03-141-2/+2
| | | | | | the new linker. llvm-svn: 127622
* Fix link of libxul with LTO and the linker in xcode4. It is not clear if thisRafael Espindola2011-03-141-2/+2
| | | | | | | is working around a bug in ld or if the new linker has a reasonable reason for wanting the string constant to be linker visible. llvm-svn: 127594
* Add unnamed_addr to the special strings created byRafael Espindola2011-01-171-4/+4
| | | | | | | __builtin___CFStringMakeConstantString This fixes PR8993. A darwin expert might want to check that this is safe. llvm-svn: 123658
* 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
* Revert changes r97693, r97700, and r97718.John McCall2010-03-041-2/+0
| | | | | | Our testing framework can't deal with disabled targets yet. llvm-svn: 97719
* XFAIL these tests on win32, since the win32 buildbot apparently disables allJohn McCall2010-03-041-0/+2
| | | | | | targets except X86. llvm-svn: 97718
* Don't explicitly force utf strings into the __TEXT,__ustringChris Lattner2010-02-011-2/+2
| | | | | | | | | | by setting the section of the generated global. This is an optimization done by the code generator, and the code being removed didn't handle the case when the string contained an embedded nul (which the code generator does correctly handle). This is rdar://7589850 llvm-svn: 95003
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-2/+2
| | | | | | | | | - 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-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* fix some cfstring related issues: Chris Lattner2009-10-141-4/+4
| | | | | | | | | | | | | 1) -fwritable-string does affect the non-utf16 version of cfstrings just not the utf16 ones. 2) utf16 strings should always be marked constant, as the __TEXT segment is readonly. 3) The name of the global doesn't matter, remove it from TargetInfo. 4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now. This fixes rdar://7115750 llvm-svn: 84077
* Make sure UTF-16 strings end with a 16-bit null (as opposed to 8-bit).Daniel Dunbar2009-08-031-2/+3
| | | | llvm-svn: 78001
* MultiTestRunner: Validate '&&' at the end of RUN lines.Daniel Dunbar2009-07-251-1/+1
| | | | | | | | - This is just to normalize, these will go away soon hopefully. Added all the missing '&&'s that have crept in. :) llvm-svn: 77062
* Output UTF-16 string literals independent of host byte order.Daniel Dunbar2009-07-231-4/+10
| | | | | | | | - Steve, can you take a look at this? It seems like this code should live elsewhere, and there is a FIXME about having Sema validates the UTF-8 to UTF-16 conversion. llvm-svn: 76915
* codegen string literals using private linkage now like llvm-gcc, eliminatingChris Lattner2009-07-161-5/+4
| | | | | | some target hooks. llvm-svn: 75895
* Add target hook for setting symbol prefix and section of unicodeDaniel Dunbar2009-04-031-1/+2
| | | | | | string literals. llvm-svn: 68363
* Add Target hooks for IRgen of [cf]string literals.Daniel Dunbar2009-03-311-0/+9
- Notably, set section on cfstring literal string data (for now, this is done everywhere because it matches what we were already doing for the CFString data itself) - <rdar://problem/6599098> [irgen] linker requires objc string data to go into cstring llvm-svn: 68160
OpenPOWER on IntegriCloud