diff options
| author | Alisdair Meredith <public@alisdairm.net> | 2009-07-14 08:10:06 +0000 |
|---|---|---|
| committer | Alisdair Meredith <public@alisdairm.net> | 2009-07-14 08:10:06 +0000 |
| commit | ed28f6e4333f6e9144137761e77d659c13cfc464 (patch) | |
| tree | c740f72994151c434ca09d7d6937b99f8b2ed048 | |
| parent | 277e11b11638293f3cf8ab102e2df2158230c20e (diff) | |
| download | bcm5719-llvm-ed28f6e4333f6e9144137761e77d659c13cfc464.tar.gz bcm5719-llvm-ed28f6e4333f6e9144137761e77d659c13cfc464.zip | |
Fix the build
llvm-svn: 75627
| -rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 37ea52b46f9..f8b92584575 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/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); |

