summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC/2010-02-01-utf16-with-null.m
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: try harder to make the CFString structure RWSaleem Abdulrasool2016-07-291-1/+1
| | | | | | | | 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
* Fix predefine for __NSConstantString struct typeBen Langmuir2016-02-041-2/+2
| | | | | | | | | | | | | | | | | Per review feedback the name was wrong and it can be used outside Objective-C. Unfortunately, making the internal struct visible broke some ASTMatchers tests that assumed that the first record decl would be from user code, rather than a builtin type. I'm worried that this will also affect users' code. So this patch adds a typedef to wrap the internal struct and only makes the typedef visible to namelookup. This is sufficient to allow the ASTReader to merge the decls we need without making the struct itself visible. rdar://problem/24425801 llvm-svn: 259734
* Reapply r259624, it is likely not the commit causing the bot failures.Quentin Colombet2016-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original message: Make CF constant string decl visible to name lookup to fix module errors The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 llvm-svn: 259721
* Revert r259624 - Make CF constant string decl visible to name lookup to fix ↵Quentin Colombet2016-02-031-2/+2
| | | | | | | | | module errors. This breaks some internal bots in stage2: clang seg fault. Looking with Ben to see what is going on. llvm-svn: 259715
* Make CF constant string decl visible to name lookup to fix module errorsBen Langmuir2016-02-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The return type of the __builtin___*StringMakeConstantString functions is a pointer to a struct, so we need that struct to be visible to name lookup so that we will correctly merge multiple declarations of that type if they come from different modules. Incidentally, to make this visible to name lookup we need to rename the type to __NSConstantString, since the real NSConstantString is an Objective-C interface type. This shouldn't affect anyone outside the compiler since users of the constant string builtins cast the result immediately to CFStringRef. Since this struct type is otherwise implicitly created by the AST context and cannot access namelookup, we make this a predefined type and initialize it in Sema. Note: this issue of builtins that refer to types not visible to name lookup technically also affects other builtins (e.g. objc_msgSendSuper), but in all other cases the builtin is a library builtin and the issue goes away if you include the library that defines the types it uses, unlike for these constant string builtins. rdar://problem/24425801 llvm-svn: 259624
* Test case updates for explicit type parameter to the gep operatorDavid Blaikie2015-03-131-1/+1
| | | | llvm-svn: 232187
* Use private linkage for utf-16 objc strings too.Rafael Espindola2014-01-211-1/+1
| | | | llvm-svn: 199709
* Give explicit sections for string constants used in NSStrings.Rafael Espindola2014-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add a triple. Should fix the 64 bit bots.Rafael Espindola2014-01-201-1/+1
| | | | llvm-svn: 199670
* Make the test more strict.Rafael Espindola2014-01-201-1/+3
| | | | llvm-svn: 199669
* Migrate, update and FileCheckize:Eric Christopher2011-08-201-0/+5
2010-02-01-utf16-with-null.m 2010-02-23-DbgInheritance.m 2010-03-17-StructRef.m 2011-03-08-IVarLookup.m from llvm/test/FrontendObjC. llvm-svn: 138180
OpenPOWER on IntegriCloud