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 | 55a719835ddc8800f94331e7ffde19cb011d325d (patch) | |
tree | 7705815fba1583e87b80fea3cc02efc17af65648 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | ec7e7dfe0a254ec628c685934b95cbd4f74a08d2 (diff) | |
download | bcm5719-llvm-55a719835ddc8800f94331e7ffde19cb011d325d.tar.gz bcm5719-llvm-55a719835ddc8800f94331e7ffde19cb011d325d.zip |
Add a comment/FIXME so Eli can sleep better:-))
llvm-svn: 68379
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 1bf73db177c..b92776face0 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/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; |