[cfe-commits] r68379 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Steve Naroff
snaroff at apple.com
Fri Apr 3 02:45:10 PDT 2009
Author: snaroff
Date: Fri Apr 3 04:44:50 2009
New Revision: 68379
URL: http://llvm.org/viewvc/llvm-project?rev=68379&view=rev
Log:
Add a comment/FIXME so Eli can sleep better:-))
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=68379&r1=68378&r2=68379&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Fri Apr 3 04:44:50 2009
@@ -1039,6 +1039,11 @@
strictConversion);
assert(Result == conversionOK && "UTF-8 to UTF-16 conversion failed");
+ // FIXME: Storing UTF-16 in a C string is a hack to test Unicode strings
+ // without doing more surgery to this routine. Since we aren't explicitly
+ // checking for endianness here, it's also a bug (when generating code for
+ // a target that doesn't match the host endianness). Modeling this as an i16
+ // array is likely the cleanest solution.
StringLength = ToPtr-&ToBuf[0];
str.assign((char *)&ToBuf[0], StringLength*2); // Twice as many UTF8 chars.
isUTF16 = true;
More information about the cfe-commits
mailing list