diff options
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 20 | ||||
-rw-r--r-- | clang/lib/Lex/LiteralSupport.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 4 |
3 files changed, 15 insertions, 12 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); diff --git a/clang/lib/Lex/LiteralSupport.cpp b/clang/lib/Lex/LiteralSupport.cpp index 09a94a11436..b6cc5996fdf 100644 --- a/clang/lib/Lex/LiteralSupport.cpp +++ b/clang/lib/Lex/LiteralSupport.cpp @@ -13,12 +13,13 @@ //===----------------------------------------------------------------------===// #include "clang/Lex/LiteralSupport.h" -#include "clang/Basic/ConvertUTF.h" #include "clang/Basic/TargetInfo.h" #include "clang/Lex/LexDiagnostic.h" #include "clang/Lex/Preprocessor.h" #include "llvm/ADT/StringExtras.h" +#include "llvm/Support/ConvertUTF.h" #include "llvm/Support/ErrorHandling.h" + using namespace clang; static unsigned getCharWidth(tok::TokenKind kind, const TargetInfo &Target) { diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index b933a5fd750..4c3c181f446 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -27,7 +27,6 @@ #include "clang/Lex/Preprocessor.h" #include "MacroArgs.h" -#include "clang/Basic/ConvertUTF.h" #include "clang/Basic/FileManager.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" @@ -47,6 +46,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/Capacity.h" +#include "llvm/Support/ConvertUTF.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" using namespace clang; @@ -501,7 +501,7 @@ static void appendCodePoint(unsigned Codepoint, llvm::SmallVectorImpl<char> &Str) { char ResultBuf[4]; char *ResultPtr = ResultBuf; - bool Res = ConvertCodePointToUTF8(Codepoint, ResultPtr); + bool Res = llvm::ConvertCodePointToUTF8(Codepoint, ResultPtr); (void)Res; assert(Res && "Unexpected conversion failure"); Str.append(ResultBuf, ResultPtr); |