diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-08 15:36:55 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-08 15:36:55 +0000 |
| commit | 8ba99c00327a4394e7568244d6cffd6e62625a7a (patch) | |
| tree | 7ab9fa5634c95f5df8575db81b24ea5586e65b28 /lib/AST/Expr.cpp | |
| parent | 70b4596d9d0d559e94f9bad8f43463e5d98a577e (diff) | |
Diffstat (limited to 'lib/AST/Expr.cpp')
| -rw-r--r-- | lib/AST/Expr.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 4a53a4123d11..c12dd6747c6d 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, |
