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 | c71f094c088c60faef6e1258ebfedeb41e959061 (patch) | |
tree | 73a62185e0a5c51f161000926e90ae437f77c8bc /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | ce2a5e18f2eac9eaf44136db8830fa2846dc3e64 (diff) | |
download | bcm5719-llvm-c71f094c088c60faef6e1258ebfedeb41e959061.tar.gz bcm5719-llvm-c71f094c088c60faef6e1258ebfedeb41e959061.zip |
ir-gen for type convesion of class objects. WIP.
llvm-svn: 80178
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index e8b7304552b..299296a6339 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/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()); |