Add codegen support for __null
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61314 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 11f07fb..db95366 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -416,6 +416,12 @@
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());