diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-26 23:31:30 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-08-26 23:31:30 +0000 |
commit | 64e690ecf7ba7ad560b0af631bb6f323c38f6da4 (patch) | |
tree | 4b06e8af2201f522ef3c8ea417ef71965ac076c7 /lib/CodeGen/CGExprScalar.cpp | |
parent | e9f8eb64ed2d41c23db4a9774768613d4e07a865 (diff) |
ir-gen for type convesion of class objects. WIP.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index e8b7304552..299296a633 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -227,6 +227,11 @@ public: return llvm::Constant::getNullValue(ConvertType(E->getType())); } Value *VisitCastExpr(const CastExpr *E) { + if (E->getCastKind() == CastExpr::CK_UserDefinedConversion) { + const CXXFunctionalCastExpr *CXXFExpr = cast<CXXFunctionalCastExpr>(E); + return CGF.EmitCXXFunctionalCastExpr(CXXFExpr).getScalarVal(); + } + // Make sure to evaluate VLA bounds now so that we have them for later. if (E->getType()->isVariablyModifiedType()) CGF.EmitVLASize(E->getType()); |