diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-30 12:06:08 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-30 12:06:08 +0000 |
commit | 9feeef40f58171a3c29649d16bd575587b39836f (patch) | |
tree | f60f0816e01549d66a8effc9ef06faef926313d1 /clang/lib/Lex/Lexer.cpp | |
parent | b311f4e84ab64d71d38ee9af0ad2d7911cb6d1ee (diff) | |
download | bcm5719-llvm-9feeef40f58171a3c29649d16bd575587b39836f.tar.gz bcm5719-llvm-9feeef40f58171a3c29649d16bd575587b39836f.zip |
Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.
llvm-svn: 173924
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 08f406b0691..6a918d6a3ad 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -25,7 +25,6 @@ //===----------------------------------------------------------------------===// #include "clang/Lex/Lexer.h" -#include "clang/Basic/ConvertUTF.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/CodeCompletionHandler.h" #include "clang/Lex/LexDiagnostic.h" @@ -34,6 +33,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/ConvertUTF.h" #include "llvm/Support/MemoryBuffer.h" #include <cstring> using namespace clang; @@ -1655,10 +1655,11 @@ FinishIdentifier: } else if (!isASCII(C)) { const char *UnicodePtr = CurPtr; UTF32 CodePoint; - ConversionResult Result = convertUTF8Sequence((const UTF8 **)&UnicodePtr, - (const UTF8 *)BufferEnd, - &CodePoint, - strictConversion); + ConversionResult Result = + llvm::convertUTF8Sequence((const UTF8 **)&UnicodePtr, + (const UTF8 *)BufferEnd, + &CodePoint, + strictConversion); if (Result != conversionOK || !isAllowedIDChar(static_cast<uint32_t>(CodePoint))) goto FinishIdentifier; @@ -3528,10 +3529,11 @@ LexNextToken: // We can't just reset CurPtr to BufferPtr because BufferPtr may point to // an escaped newline. --CurPtr; - ConversionResult Status = convertUTF8Sequence((const UTF8 **)&CurPtr, - (const UTF8 *)BufferEnd, - &CodePoint, - strictConversion); + ConversionResult Status = + llvm::convertUTF8Sequence((const UTF8 **)&CurPtr, + (const UTF8 *)BufferEnd, + &CodePoint, + strictConversion); if (Status == conversionOK) return LexUnicode(Result, CodePoint, CurPtr); |