diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-23 10:55:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-23 10:55:15 +0000 |
commit | 5f9e272e632e951b1efe824cd16acb4d96077930 (patch) | |
tree | 3268557d12b85d0c2e72de5329ec83d4fc0bca48 /lib/Lex/Preprocessor.cpp | |
parent | d47d3b0cfeb7e8564ff77f48130fe63282b6d127 (diff) |
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index e7aa286a16..fbdb903598 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -92,7 +92,7 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, SetPoisonReason(Ident__VA_ARGS__,diag::ext_pp_bad_vaargs_use); // Initialize the pragma handlers. - PragmaHandlers = new PragmaNamespace(llvm::StringRef()); + PragmaHandlers = new PragmaNamespace(StringRef()); RegisterBuiltinPragmas(); // Initialize builtin macros like __LINE__ and friends. @@ -172,7 +172,7 @@ void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const { llvm::errs() << " [ExpandDisabled]"; if (Tok.needsCleaning()) { const char *Start = SourceMgr.getCharacterData(Tok.getLocation()); - llvm::errs() << " [UnClean='" << llvm::StringRef(Start, Tok.getLength()) + llvm::errs() << " [UnClean='" << StringRef(Start, Tok.getLength()) << "']"; } @@ -279,7 +279,7 @@ bool Preprocessor::SetCodeCompletionPoint(const FileEntry *File, // Truncate the buffer. if (Position < Buffer->getBufferEnd()) { - llvm::StringRef Data(Buffer->getBufferStart(), + StringRef Data(Buffer->getBufferStart(), Position-Buffer->getBufferStart()); MemoryBuffer *TruncatedBuffer = MemoryBuffer::getMemBufferCopy(Data, Buffer->getBufferIdentifier()); @@ -305,8 +305,8 @@ void Preprocessor::CodeCompleteNaturalLanguage() { /// getSpelling - This method is used to get the spelling of a token into a /// SmallVector. Note that the returned StringRef may not point to the /// supplied buffer if a copy can be avoided. -llvm::StringRef Preprocessor::getSpelling(const Token &Tok, - llvm::SmallVectorImpl<char> &Buffer, +StringRef Preprocessor::getSpelling(const Token &Tok, + SmallVectorImpl<char> &Buffer, bool *Invalid) const { // NOTE: this has to be checked *before* testing for an IdentifierInfo. if (Tok.isNot(tok::raw_identifier)) { @@ -321,7 +321,7 @@ llvm::StringRef Preprocessor::getSpelling(const Token &Tok, const char *Ptr = Buffer.data(); unsigned Len = getSpelling(Tok, Ptr, Invalid); - return llvm::StringRef(Ptr, Len); + return StringRef(Ptr, Len); } /// CreateString - Plop the specified string into a scratch buffer and return a @@ -407,12 +407,12 @@ IdentifierInfo *Preprocessor::LookUpIdentifierInfo(Token &Identifier) const { IdentifierInfo *II; if (!Identifier.needsCleaning()) { // No cleaning needed, just use the characters from the lexed buffer. - II = getIdentifierInfo(llvm::StringRef(Identifier.getRawIdentifierData(), + II = getIdentifierInfo(StringRef(Identifier.getRawIdentifierData(), Identifier.getLength())); } else { // Cleaning needed, alloca a buffer, clean into it, then use the buffer. llvm::SmallString<64> IdentifierBuffer; - llvm::StringRef CleanedStr = getSpelling(Identifier, IdentifierBuffer); + StringRef CleanedStr = getSpelling(Identifier, IdentifierBuffer); II = getIdentifierInfo(CleanedStr); } |