aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-25 11:45:40 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-25 11:45:40 +0000
commit2de56d1d0c3a504ad1529de2677628bdfbb95cd4 (patch)
tree8a74bb48a4267a5f8ef8bff8b8b048c3b30cc50d /lib/CodeGen/CGExprAgg.cpp
parent0799c53fc2bb7acf937c8a8e165033dba1a5aba3 (diff)
GCC didn't care for my attempt at API compatibility, so brute-force everything
to the new constants. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 89fea398d3..2d8e2b2b42 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -242,7 +242,7 @@ void AggExprEmitter::EmitFinalDestCopy(const Expr *E, LValue Src, bool Ignore) {
//===----------------------------------------------------------------------===//
void AggExprEmitter::VisitCastExpr(CastExpr *E) {
- if (!DestPtr && E->getCastKind() != CastExpr::CK_Dynamic) {
+ if (!DestPtr && E->getCastKind() != CK_Dynamic) {
Visit(E->getSubExpr());
return;
}
@@ -250,7 +250,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
switch (E->getCastKind()) {
default: assert(0 && "Unhandled cast kind!");
- case CastExpr::CK_Dynamic: {
+ case CK_Dynamic: {
assert(isa<CXXDynamicCastExpr>(E) && "CK_Dynamic without a dynamic_cast?");
LValue LV = CGF.EmitCheckedLValue(E->getSubExpr());
// FIXME: Do we also need to handle property references here?
@@ -264,7 +264,7 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
break;
}
- case CastExpr::CK_ToUnion: {
+ case CK_ToUnion: {
// GCC union extension
QualType Ty = E->getSubExpr()->getType();
QualType PtrTy = CGF.getContext().getPointerType(Ty);
@@ -275,26 +275,26 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {
break;
}
- case CastExpr::CK_DerivedToBase:
- case CastExpr::CK_BaseToDerived:
- case CastExpr::CK_UncheckedDerivedToBase: {
+ case CK_DerivedToBase:
+ case CK_BaseToDerived:
+ case CK_UncheckedDerivedToBase: {
assert(0 && "cannot perform hierarchy conversion in EmitAggExpr: "
"should have been unpacked before we got here");
break;
}
// FIXME: Remove the CK_Unknown check here.
- case CastExpr::CK_Unknown:
- case CastExpr::CK_NoOp:
- case CastExpr::CK_UserDefinedConversion:
- case CastExpr::CK_ConstructorConversion:
+ case CK_Unknown:
+ case CK_NoOp:
+ case CK_UserDefinedConversion:
+ case CK_ConstructorConversion:
assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(),
E->getType()) &&
"Implicit cast types must be compatible");
Visit(E->getSubExpr());
break;
- case CastExpr::CK_LValueBitCast:
+ case CK_LValueBitCast:
llvm_unreachable("there are no lvalue bit-casts on aggregates");
break;
}
@@ -337,8 +337,7 @@ void AggExprEmitter::VisitStmtExpr(const StmtExpr *E) {
}
void AggExprEmitter::VisitBinaryOperator(const BinaryOperator *E) {
- if (E->getOpcode() == BinaryOperator::PtrMemD ||
- E->getOpcode() == BinaryOperator::PtrMemI)
+ if (E->getOpcode() == BO_PtrMemD || E->getOpcode() == BO_PtrMemI)
VisitPointerToDataMemberBinaryOperator(E);
else
CGF.ErrorUnsupported(E, "aggregate binary expression");