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
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index 351f8e2..6b3ced0 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -900,12 +900,7 @@
llvm::Constant *CGObjCCommonMac::GenerateConstantString(
const ObjCStringLiteral *SL) {
- std::string Str(SL->getString()->getStrData(),
- SL->getString()->getByteLength());
- if (SL->getString()->containsNonAscii()) {
- // FIXME: Convert from UTF-8 to UTF-16.
- }
- return CGM.GetAddrOfConstantCFString(Str);
+ return CGM.GetAddrOfConstantCFString(SL->getString());
}
/// Generates a message send where the super is the receiver. This is