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
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp
index 4a53a41..c12dd67 100644
--- a/lib/AST/Expr.cpp
+++ b/lib/AST/Expr.cpp
@@ -1556,6 +1556,22 @@
   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,