Introduce a single AST node SizeOfAlignOfExpr for all sizeof and alignof expressions, both of values and types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59057 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 35d7cc8..9d78c42 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -2254,9 +2254,10 @@
FT->getResultType(), SourceLocation());
// Build sizeof(returnType)
- SizeOfAlignOfTypeExpr *sizeofExpr = new SizeOfAlignOfTypeExpr(true,
- returnType, Context->getSizeType(),
- SourceLocation(), SourceLocation());
+ SizeOfAlignOfExpr *sizeofExpr = new SizeOfAlignOfExpr(true, true,
+ returnType.getAsOpaquePtr(),
+ Context->getSizeType(),
+ SourceLocation(), SourceLocation());
// (sizeof(returnType) <= 8 ? objc_msgSend(...) : objc_msgSend_stret(...))
// FIXME: Value of 8 is base on ppc32/x86 ABI for the most common cases.
// For X86 it is more complicated and some kind of target specific routine