]> granicus.if.org Git - clang/commitdiff
Fix the build
authorAlisdair Meredith <public@alisdairm.net>
Tue, 14 Jul 2009 08:10:06 +0000 (08:10 +0000)
committerAlisdair Meredith <public@alisdairm.net>
Tue, 14 Jul 2009 08:10:06 +0000 (08:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75627 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/LiteralSupport.cpp

index 37ea52b46f9d82af3e16bc86ec586e4fcb4f9320..f8b92584575718c491e39e474b38e5c5921575e5 100644 (file)
@@ -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);