diff options
author | Steve Naroff <snaroff@apple.com> | 2009-04-01 13:55:36 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2009-04-01 13:55:36 +0000 |
commit | 8d4141f83d9de379547cf05bd75d4c6cf894b189 (patch) | |
tree | eac41be40f1cdc041a7af5afe13279cb39b97995 /lib/CodeGen/CodeGenModule.cpp | |
parent | 4e93b34fdb798abfa0534062a139f2c37cbf876e (diff) |
More "prep" work for handling UTF16 CFString.
Patch by Jean-Daniel Dupas. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 101b2e58b7..d428c836af 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1002,7 +1002,11 @@ static void appendFieldAndPadding(CodeGenModule &CGM, // We still need to work out the details of handling UTF-16. // See: <rdr://2996215> llvm::Constant *CodeGenModule:: -GetAddrOfConstantCFString(const std::string &str) { +GetAddrOfConstantCFString(const StringLiteral *Literal) { + // if (Literal->containsNonAsciiOrNull()) { + // // FIXME: Convert from UTF-8 to UTF-16. + // } + std::string str(Literal->getStrData(), Literal->getByteLength()); llvm::StringMapEntry<llvm::Constant *> &Entry = CFConstantStringMap.GetOrCreateValue(&str[0], &str[str.length()]); |