diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-03 09:44:50 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-03 09:44:50 +0000 |
commit | db6d4f65f9f0a4b6e9b4b6ead9968c2e372e9642 (patch) | |
tree | cfd47f33785b17a04f0eaf6f86abcbe0791e4102 /lib/CodeGen | |
parent | a1718c78770db93d1b762620f07728a56786f2ae (diff) |
Add a comment/FIXME so Eli can sleep better:-))
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 1bf73db177..b92776face 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1039,6 +1039,11 @@ GetAddrOfConstantCFString(const StringLiteral *Literal) { 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; |