aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Expr.cpp
diff options
context:
space:
mode:
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,