From 223156a365c6c602c6634ea84ffe962fcc4477ef Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 31 Oct 2014 06:57:10 +0000 Subject: [PATCH] Remove CastKind typedef from CastExpr since CastKind is in the clang namespace. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220955 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/Expr.h | 3 --- lib/CodeGen/CGExprComplex.cpp | 4 ++-- lib/Serialization/ASTReaderStmt.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index b838204b5d..d5c6c9acfe 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -2658,9 +2658,6 @@ public: /// representation in the source code (ExplicitCastExpr's derived /// classes). class CastExpr : public Expr { -public: - typedef clang::CastKind CastKind; - private: Stmt *Op; diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index ca19c94be0..4700c7eef3 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -146,7 +146,7 @@ public: // FIXME: CompoundLiteralExpr - ComplexPairTy EmitCast(CastExpr::CastKind CK, Expr *Op, QualType DestTy); + ComplexPairTy EmitCast(CastKind CK, Expr *Op, QualType DestTy); ComplexPairTy VisitImplicitCastExpr(ImplicitCastExpr *E) { // Unlike for scalars, we don't have to worry about function->ptr demotion // here. @@ -417,7 +417,7 @@ ComplexPairTy ComplexExprEmitter::EmitScalarToComplexCast(llvm::Value *Val, return ComplexPairTy(Val, llvm::Constant::getNullValue(Val->getType())); } -ComplexPairTy ComplexExprEmitter::EmitCast(CastExpr::CastKind CK, Expr *Op, +ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op, QualType DestTy) { switch (CK) { case CK_Dependent: llvm_unreachable("dependent cast kind in IR gen!"); diff --git a/lib/Serialization/ASTReaderStmt.cpp b/lib/Serialization/ASTReaderStmt.cpp index 9e5593fc9e..9c669d7b24 100644 --- a/lib/Serialization/ASTReaderStmt.cpp +++ b/lib/Serialization/ASTReaderStmt.cpp @@ -635,7 +635,7 @@ void ASTStmtReader::VisitCastExpr(CastExpr *E) { unsigned NumBaseSpecs = Record[Idx++]; assert(NumBaseSpecs == E->path_size()); E->setSubExpr(Reader.ReadSubExpr()); - E->setCastKind((CastExpr::CastKind)Record[Idx++]); + E->setCastKind((CastKind)Record[Idx++]); CastExpr::path_iterator BaseI = E->path_begin(); while (NumBaseSpecs--) { CXXBaseSpecifier *BaseSpec = new (Reader.getContext()) CXXBaseSpecifier; -- 2.40.0