aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlisdair Meredith <public@alisdairm.net>2009-07-14 08:10:06 +0000
committerAlisdair Meredith <public@alisdairm.net>2009-07-14 08:10:06 +0000
commit1a75ee270941dd8b5c7fdd23dffb5e81a0fd7290 (patch)
tree62f155ebf425565b1453d38fe89e75d02b5d2b9f
parentf5c209d23b20ada4a9b6235db50317239cbf6ae1 (diff)
Fix the build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75627 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Lex/LiteralSupport.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp
index 37ea52b46f..f8b9258457 100644
--- a/lib/Lex/LiteralSupport.cpp
+++ b/lib/Lex/LiteralSupport.cpp
@@ -95,7 +95,9 @@ static unsigned ProcessCharEscape(const char *&ThisTokBuf,
}
// See if any bits will be truncated when evaluated as a character.
- unsigned CharWidth = PP.getTargetInfo().getCharWidth(IsWide);
+ unsigned CharWidth = IsWide
+ ? PP.getTargetInfo().getWCharWidth()
+ : PP.getTargetInfo().getCharWidth();
if (CharWidth != 32 && (ResultChar >> CharWidth) != 0) {
Overflow = true;
@@ -124,7 +126,9 @@ static unsigned ProcessCharEscape(const char *&ThisTokBuf,
ThisTokBuf[0] >= '0' && ThisTokBuf[0] <= '7');
// Check for overflow. Reject '\777', but not L'\777'.
- unsigned CharWidth = PP.getTargetInfo().getCharWidth(IsWide);
+ unsigned CharWidth = IsWide
+ ? PP.getTargetInfo().getWCharWidth()
+ : PP.getTargetInfo().getCharWidth();
if (CharWidth != 32 && (ResultChar >> CharWidth) != 0) {
PP.Diag(Loc, diag::warn_octal_escape_too_large);