[llvm-commits] [llvm] r95014 - /llvm/trunk/test/FrontendObjC/2010-02-01-utf16-with-null.m

Chris Lattner clattner at apple.com
Mon Feb 1 15:49:14 PST 2010


On Feb 1, 2010, at 3:36 PM, Evan Cheng wrote:

>
> On Feb 1, 2010, at 3:29 PM, Chris Lattner wrote:
>
>>
>> On Feb 1, 2010, at 2:32 PM, Evan Cheng wrote:
>>
>>> Author: evancheng
>>> Date: Mon Feb  1 16:32:42 2010
>>> New Revision: 95014
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=95014&view=rev
>>> Log:
>>> Add test case for 95013.
>>
>> Hey Evan,
>>
>> I don't think this will go into ustring anyway, you need a non- 
>> ascii (unicode) character in there as well as \0.
>
> Does '@' mean it's going to be a CFString?

Yes, but not that it will have 16-bit elements.  For example @"foo"  
gets emitted as:

	.section	__TEXT,__cstring,cstring_literals
L_.str:
	.asciz	 "foo"

>
> This compiles to the following before:
> .section        __TEXT,__ustring
> 	.align  1
> ___utf16_string_1:
> 	.asciz   "g\000o\000o\000d\000\000\000b\000y\000e\000\000"
>
> Now:
>        .section        __TEXT,__const
>        .align  1
> ___utf16_string_1:
>        .asciz   "g\000o\000o\000d\000\000\000b\000y\000e\000\000"

Huh, ok, I guess that's enough then!

-Chris



More information about the llvm-commits mailing list