diff options
author | Anders Carlsson <andersca@mac.com> | 2009-08-24 18:26:39 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-08-24 18:26:39 +0000 |
commit | 3df53bcf10f69b9be6d326d3749975d06bac12cf (patch) | |
tree | af293959c704de1fc84b9dc4766fd53f1fc2cc1f /clang/lib/CodeGen/CGExprScalar.cpp | |
parent | 15583e4493b750a5e14f006dbc1555a5d32eb01d (diff) | |
download | bcm5719-llvm-3df53bcf10f69b9be6d326d3749975d06bac12cf.tar.gz bcm5719-llvm-3df53bcf10f69b9be6d326d3749975d06bac12cf.zip |
Handle CK_NullToMemberPointer in ScalarExprEmitter::EmitCast
llvm-svn: 79929
Diffstat (limited to 'clang/lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprScalar.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index d94ee5bed21..0524b447180 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -656,7 +656,14 @@ Value *ScalarExprEmitter::EmitCastExpr(const Expr *E, QualType DestTy, CastExpr::CastKind Kind) { if (!DestTy->isVoidType()) TestAndClearIgnoreResultAssign(); - + + switch (Kind) { + default: + break; + case CastExpr::CK_NullToMemberPointer: + return CGF.CGM.EmitNullConstant(DestTy); + } + // Handle cases where the source is an non-complex type. if (!CGF.hasAggregateLLVMType(E->getType())) { |