diff options
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 5 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 1 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 3 | 
4 files changed, 9 insertions, 3 deletions
| diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index a35f81ca206..ad51316a1f5 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -1867,7 +1867,8 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E) {      return MakeAddrLValue(V, E->getType());    } -  case CK_Dynamic: { +  case CK_Dynamic: +  case CK_DynamicToNull: {      LValue LV = EmitLValue(E->getSubExpr());      llvm::Value *V = LV.getAddress();      const CXXDynamicCastExpr *DCE = cast<CXXDynamicCastExpr>(E); diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index 75e3a7879d4..5e1ac3cbacb 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/lib/CodeGen/CGExprAgg.cpp @@ -255,7 +255,10 @@ void AggExprEmitter::VisitCastExpr(CastExpr *E) {    }    switch (E->getCastKind()) { -  case CK_Dynamic: { +  case CK_Dynamic: +  case CK_DynamicToNull: { + +    // FIXME: Actually handle DynamicToNull here.      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? diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 822a999b963..578a37f0fcf 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -552,6 +552,7 @@ public:      case CK_GetObjCProperty:      case CK_ToVoid:      case CK_Dynamic: +    case CK_DynamicToNull:      case CK_ResolveUnknownAnyType:        return 0; diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index 65aa46fff06..322b6e0c498 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1053,7 +1053,8 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) {                                       CE->path_begin(), CE->path_end(),                                       ShouldNullCheckClassCastValue(CE));    } -  case CK_Dynamic: { +  case CK_Dynamic: +  case CK_DynamicToNull: {      Value *V = Visit(const_cast<Expr*>(E));      const CXXDynamicCastExpr *DCE = cast<CXXDynamicCastExpr>(CE);      return CGF.EmitDynamicCast(V, DCE); | 

