summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-14 16:46:37 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-04-14 16:46:37 +0000
commit69650b099a4d0e64993e99ef6c7abe540cb93bb8 (patch)
treeea5cdad52312eed28859e5bc992f63402e87a817 /clang
parent02e987f3e8f431c7369e9100a8473b7be6867039 (diff)
downloadbcm5719-llvm-69650b099a4d0e64993e99ef6c7abe540cb93bb8.tar.gz
bcm5719-llvm-69650b099a4d0e64993e99ef6c7abe540cb93bb8.zip
Literal value calculation isn't likely to overflow on targets having int as 32 or less. Fixing the assert as it otherwise triggers for PIC16 which as i16 as int.
llvm-svn: 69046
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Lex/LiteralSupport.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp
index a52d951e754..e8d31628865 100644
--- a/clang/lib/Lex/LiteralSupport.cpp
+++ b/clang/lib/Lex/LiteralSupport.cpp
@@ -632,10 +632,10 @@ CharLiteralParser::CharLiteralParser(const char *begin, const char *end,
assert(begin[0] == '\'' && "Invalid token lexed");
++begin;
- // FIXME: This assumes that 'int' is 32-bits in overflow calculation, and the
- // size of "value".
- assert(PP.getTargetInfo().getIntWidth() == 32 &&
- "Assumes sizeof(int) == 4 for now");
+ // FIXME: This assumes that 'int' is not more than 32-bits in overflow
+ // calculation, and the size of "value".
+ assert(PP.getTargetInfo().getIntWidth() <= 32 &&
+ "Assumes sizeof(int) <= 4 for now");
// FIXME: This assumes that wchar_t is 32-bits for now.
assert(PP.getTargetInfo().getWCharWidth() == 32 &&
"Assumes sizeof(wchar_t) == 4 for now");
OpenPOWER on IntegriCloud