aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-08-23 00:02:11 +0000
committerAnders Carlsson <andersca@mac.com>2009-08-23 00:02:11 +0000
commitd1a9bac24466831e089c8f330ec9264fb3ace367 (patch)
tree2c86ae5ede6995ed324e60f64838126f4c0bba5a /lib/CodeGen/CGExprConstant.cpp
parent0086ccb1985f392ac688a19b35b300610db102e8 (diff)
Handle CK_NullToMemberPointer casts in the constant expr emitter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index e67a747fa1..b3e0fef1ba 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -414,6 +414,8 @@ public:
llvm::StructType::get(C->getType()->getContext(), Types, false);
return llvm::ConstantStruct::get(STy, Elts);
}
+ case CastExpr::CK_NullToMemberPointer:
+ return CGM.EmitNullConstant(E->getType());
default: {
// FIXME: This should be handled by the CK_NoOp cast kind.
// Explicit and implicit no-op casts