aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-07 19:51:47 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-07 19:51:47 +0000
commit02d95baf23cbb29ea4ca58b3e8f54f92f845b900 (patch)
tree057b3b8f236157a1ca5d3d718624213f64e41cea /lib/AST/Expr.cpp
parentfc0f021b492cf28ee7b3a6bd4445ae569e6f15de (diff)
Instantiation support for more Obj-C expressions, string literals, @selector and @protocol expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73036 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r--lib/AST/Expr.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 4a53a4123d..c12dd6747c 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1556,6 +1556,22 @@ ObjCMessageExpr::ObjCMessageExpr(Expr *receiver, Selector selInfo,
RBracloc = RBrac;
}
+ObjCStringLiteral* ObjCStringLiteral::Clone(ASTContext &C) const {
+ // Clone the string literal.
+ StringLiteral *NewString =
+ String ? cast<StringLiteral>(String)->Clone(C) : 0;
+
+ return new (C) ObjCStringLiteral(NewString, getType(), AtLoc);
+}
+
+ObjCSelectorExpr *ObjCSelectorExpr::Clone(ASTContext &C) const {
+ return new (C) ObjCSelectorExpr(getType(), SelName, AtLoc, RParenLoc);
+}
+
+ObjCProtocolExpr *ObjCProtocolExpr::Clone(ASTContext &C) const {
+ return new (C) ObjCProtocolExpr(getType(), Protocol, AtLoc, RParenLoc);
+}
+
// constructor for class messages.
// FIXME: clsName should be typed to ObjCInterfaceType
ObjCMessageExpr::ObjCMessageExpr(IdentifierInfo *clsName, Selector selInfo,