diff options
author | Anders Carlsson <andersca@mac.com> | 2007-10-29 05:01:08 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2007-10-29 05:01:08 +0000 |
commit | 85f9bceab1542aafff012d4d28e998f4ba16e362 (patch) | |
tree | b7fca1677fcf450c4cd1e8349873d93c14d43359 /Driver/RewriteTest.cpp | |
parent | cd4b83cb4b4d69dbfa35ef97fe8ab88c0f2698a9 (diff) |
Add (partial) support for @encode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43439 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteTest.cpp')
-rw-r--r-- | Driver/RewriteTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Driver/RewriteTest.cpp b/Driver/RewriteTest.cpp index db2c1ee70b..0c303daddf 100644 --- a/Driver/RewriteTest.cpp +++ b/Driver/RewriteTest.cpp @@ -329,7 +329,10 @@ Stmt *RewriteTest::RewriteFunctionBody(Stmt *S) { Stmt *RewriteTest::RewriteAtEncode(ObjCEncodeExpr *Exp) { // Create a new string expression. QualType StrType = Context->getPointerType(Context->CharTy); - Expr *Replacement = new StringLiteral("foo", 3, false, StrType, + std::string StrEncoding; + Context->getObjcEncodingForType(Exp->getEncodedType(), StrEncoding); + Expr *Replacement = new StringLiteral(StrEncoding.c_str(), + StrEncoding.length(), false, StrType, SourceLocation(), SourceLocation()); Rewrite.ReplaceStmt(Exp, Replacement); delete Exp; |