diff options
| author | Mike Stump <mrs@apple.com> | 2009-11-16 06:50:58 +0000 |
|---|---|---|
| committer | Mike Stump <mrs@apple.com> | 2009-11-16 06:50:58 +0000 |
| commit | c849c052d6b4b70f2651c1969531861a5f230053 (patch) | |
| tree | b67620b7b9fd6e85155ea4dfd0c53512532a28c2 /lib/CodeGen/CGExprScalar.cpp | |
| parent | 083e3060b77917c1c1096127ab99ae921d7e8782 (diff) | |
| download | clang-c849c052d6b4b70f2651c1969531861a5f230053.tar.gz clang-c849c052d6b4b70f2651c1969531861a5f230053.tar.bz2 clang-c849c052d6b4b70f2651c1969531861a5f230053.tar.xz | |
Implement most of dynamic_cast. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index d36eb070b1..f81aae97aa 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -852,6 +852,12 @@ Value *ScalarExprEmitter::EmitCastExpr(const CastExpr *CE) { Value *Src = Visit(const_cast<Expr*>(E)); return Builder.CreatePtrToInt(Src, ConvertType(DestTy)); } + + case CastExpr::CK_Dynamic: { + Value *V = Visit(const_cast<Expr*>(E)); + const CXXDynamicCastExpr *DCE = cast<CXXDynamicCastExpr>(CE); + return CGF.EmitDynamicCast(V, DCE); + } } |
