summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Expr.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-08 02:50:17 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-08 02:50:17 +0000
commitc5c57c3b8632c77ad01d08c59490ab5cdd78d581 (patch)
tree5e30e26404fcfb966ecc5d0b09aad9df8ccabc29 /clang/lib/AST/Expr.cpp
parent032ab6f978899d0b5c391de58d602df4a5eb39e9 (diff)
downloadbcm5719-llvm-c5c57c3b8632c77ad01d08c59490ab5cdd78d581.tar.gz
bcm5719-llvm-c5c57c3b8632c77ad01d08c59490ab5cdd78d581.zip
Get rid of Stmt::Clone now that we can reference count statements instead.
llvm-svn: 78452
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r--clang/lib/AST/Expr.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp
index 0f3cbe18d9e..2c07de6c79a 100644
--- a/clang/lib/AST/Expr.cpp
+++ b/clang/lib/AST/Expr.cpp
@@ -28,36 +28,6 @@ using namespace clang;
// Primary Expressions.
//===----------------------------------------------------------------------===//
-PredefinedExpr* PredefinedExpr::Clone(ASTContext &C) const {
- return new (C) PredefinedExpr(Loc, getType(), Type);
-}
-
-IntegerLiteral* IntegerLiteral::Clone(ASTContext &C) const {
- return new (C) IntegerLiteral(Value, getType(), Loc);
-}
-
-CharacterLiteral* CharacterLiteral::Clone(ASTContext &C) const {
- return new (C) CharacterLiteral(Value, IsWide, getType(), Loc);
-}
-
-FloatingLiteral* FloatingLiteral::Clone(ASTContext &C) const {
- return new (C) FloatingLiteral(Value, IsExact, getType(), Loc);
-}
-
-ImaginaryLiteral* ImaginaryLiteral::Clone(ASTContext &C) const {
- // FIXME: Use virtual Clone(), once it is available
- Expr *ClonedVal = 0;
- if (const IntegerLiteral *IntLit = dyn_cast<IntegerLiteral>(Val))
- ClonedVal = IntLit->Clone(C);
- else
- ClonedVal = cast<FloatingLiteral>(Val)->Clone(C);
- return new (C) ImaginaryLiteral(ClonedVal, getType());
-}
-
-GNUNullExpr* GNUNullExpr::Clone(ASTContext &C) const {
- return new (C) GNUNullExpr(getType(), TokenLoc);
-}
-
/// getValueAsApproximateDouble - This returns the value as an inaccurate
/// double. Note that this may cause loss of precision, but is useful for
/// debugging dumps, etc.
@@ -106,11 +76,6 @@ StringLiteral *StringLiteral::CreateEmpty(ASTContext &C, unsigned NumStrs) {
return SL;
}
-StringLiteral* StringLiteral::Clone(ASTContext &C) const {
- return Create(C, StrData, ByteLength, IsWide, getType(),
- TokLocs, NumConcatenated);
-}
-
void StringLiteral::DoDestroy(ASTContext &C) {
C.Deallocate(const_cast<char*>(StrData));
Expr::DoDestroy(C);
@@ -1564,22 +1529,6 @@ 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(), TheProtocol, AtLoc, RParenLoc);
-}
-
// constructor for class messages.
// FIXME: clsName should be typed to ObjCInterfaceType
ObjCMessageExpr::ObjCMessageExpr(IdentifierInfo *clsName, Selector selInfo,
@@ -1835,10 +1784,6 @@ void DesignatedInitExpr::DoDestroy(ASTContext &C) {
Expr::DoDestroy(C);
}
-ImplicitValueInitExpr *ImplicitValueInitExpr::Clone(ASTContext &C) const {
- return new (C) ImplicitValueInitExpr(getType());
-}
-
//===----------------------------------------------------------------------===//
// ExprIterator.
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud