summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
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
commit39def3adc820efa04547b08e0f8c7838a90e6777 (patch)
tree74880af256552f5afc9f98769b9ee39cfcdf883c /clang/lib/AST
parentfc24b63b9afe8c5a8944be3080aa5c5b0c8b5004 (diff)
downloadbcm5719-llvm-39def3adc820efa04547b08e0f8c7838a90e6777.tar.gz
bcm5719-llvm-39def3adc820efa04547b08e0f8c7838a90e6777.zip
Add codegen support for __null
llvm-svn: 61314
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ExprConstant.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index 11f07fb1166..db9536633be 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud