aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2008-12-21 22:39:40 +0000
committerAnders Carlsson <andersca@mac.com>2008-12-21 22:39:40 +0000
commit3f70456b8adb0405ef2a47d51f9fc2d5937ae8ae (patch)
tree4a989498d0146c8d241641cf6633bb220a5b9eb9 /lib/AST/ExprConstant.cpp
parenta89d82c1c819d17042ec2db4283326a850229b21 (diff)
Add codegen support for __null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 11f07fb116..db9536633b 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -416,6 +416,12 @@ public:
return true;
}
+ bool VisitGNUNullExpr(const GNUNullExpr *E) {
+ Result = APSInt::getNullValue(getIntTypeSizeInBits(E->getType()));
+ Result.setIsUnsigned(E->getType()->isUnsignedIntegerType());
+ return true;
+ }
+
bool VisitCXXZeroInitValueExpr(const CXXZeroInitValueExpr *E) {
Result = APSInt::getNullValue(getIntTypeSizeInBits(E->getType()));
Result.setIsUnsigned(E->getType()->isUnsignedIntegerType());