[cfe-commits] r123791 - /cfe/trunk/lib/Sema/SemaExpr.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jan 18 16:11:41 PST 2011
Author: chapuni
Date: Tue Jan 18 18:11:41 2011
New Revision: 123791
URL: http://llvm.org/viewvc/llvm-project?rev=123791&view=rev
Log:
lib/Sema/SemaExpr.cpp: __null should be LongLongTy on LLP64 Win64.
Modified:
cfe/trunk/lib/Sema/SemaExpr.cpp
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=123791&r1=123790&r2=123791&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Jan 18 18:11:41 2011
@@ -8582,10 +8582,17 @@
// The type of __null will be int or long, depending on the size of
// pointers on the target.
QualType Ty;
- if (Context.Target.getPointerWidth(0) == Context.Target.getIntWidth())
+ unsigned pw = Context.Target.getPointerWidth(0);
+ if (pw == Context.Target.getIntWidth())
Ty = Context.IntTy;
- else
+ else if (pw == Context.Target.getLongWidth())
Ty = Context.LongTy;
+ else if (pw == Context.Target.getLongLongWidth())
+ Ty = Context.LongLongTy;
+ else {
+ assert(!"I don't know size of pointer!");
+ Ty = Context.IntTy;
+ }
return Owned(new (Context) GNUNullExpr(Ty, TokenLoc));
}
More information about the cfe-commits
mailing list