From 8d4141f83d9de379547cf05bd75d4c6cf894b189 Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Wed, 1 Apr 2009 13:55:36 +0000 Subject: 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 --- lib/CodeGen/CGExprConstant.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/CodeGen/CGExprConstant.cpp') diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 89b331950c..51ad5b67b8 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -442,9 +442,8 @@ public: break; const Expr *Arg = CE->getArg(0)->IgnoreParenCasts(); const StringLiteral *Literal = cast(Arg); - std::string S(Literal->getStrData(), Literal->getByteLength()); // FIXME: need to deal with UCN conversion issues. - return CGM.GetAddrOfConstantCFString(S); + return CGM.GetAddrOfConstantCFString(Literal); } case Expr::BlockExprClass: { std::string FunctionName; -- cgit v1.2.3