diff options
author | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-12 19:30:44 +0000 |
---|---|---|
committer | Dmitri Gribenko <gribozavr@gmail.com> | 2013-01-12 19:30:44 +0000 |
commit | cfa88f893915ceb8ae4ce2f17c46c24a4d67502f (patch) | |
tree | 483833afb997605d25c29455d4aaed40bd95f1da /lib/Frontend | |
parent | 9cd506b7c983829a33ae7ac1297228d146c58a69 (diff) |
Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/ASTConsumers.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/ASTUnit.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/DependencyGraph.cpp | 13 | ||||
-rw-r--r-- | lib/Frontend/DiagnosticRenderer.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/LayoutOverrideSource.cpp | 4 | ||||
-rw-r--r-- | lib/Frontend/SerializedDiagnosticPrinter.cpp | 23 | ||||
-rw-r--r-- | lib/Frontend/Warnings.cpp | 2 |
9 files changed, 26 insertions, 28 deletions
diff --git a/lib/Frontend/ASTConsumers.cpp b/lib/Frontend/ASTConsumers.cpp index 0fdd57df43..687fc00c6c 100644 --- a/lib/Frontend/ASTConsumers.cpp +++ b/lib/Frontend/ASTConsumers.cpp @@ -61,7 +61,7 @@ namespace { if (D != NULL && filterMatches(D)) { bool ShowColors = Out.has_colors(); if (ShowColors) - Out.changeColor(llvm::raw_ostream::BLUE); + Out.changeColor(raw_ostream::BLUE); Out << (Dump ? "Dumping " : "Printing ") << getName(D) << ":\n"; if (ShowColors) Out.resetColor(); diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp index 35a9aa4ff0..a958fd93d6 100644 --- a/lib/Frontend/ASTUnit.cpp +++ b/lib/Frontend/ASTUnit.cpp @@ -155,7 +155,7 @@ static void removeOnDiskEntry(const ASTUnit *AU) { } } -static void setPreambleFile(const ASTUnit *AU, llvm::StringRef preambleFile) { +static void setPreambleFile(const ASTUnit *AU, StringRef preambleFile) { getOnDiskData(AU).PreambleFile = preambleFile; } diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index 5b2be91967..057adbd10a 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -1108,7 +1108,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, if (!Sub) { // Attempt to perform typo correction to find a module name that works. - llvm::SmallVector<StringRef, 2> Best; + SmallVector<StringRef, 2> Best; unsigned BestEditDistance = (std::numeric_limits<unsigned>::max)(); for (clang::Module::submodule_iterator J = Module->submodule_begin(), diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 8cb1d16931..0f00c07ca9 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -70,7 +70,7 @@ static unsigned getOptimizationLevel(ArgList &Args, InputKind IK, assert (A->getOption().matches(options::OPT_O)); - llvm::StringRef S(A->getValue()); + StringRef S(A->getValue()); if (S == "s" || S == "z" || S.empty()) return 2; @@ -1495,7 +1495,7 @@ bool CompilerInvocation::CreateFromArgs(CompilerInvocation &Res, namespace { class ModuleSignature { - llvm::SmallVector<uint64_t, 16> Data; + SmallVector<uint64_t, 16> Data; unsigned CurBit; uint64_t CurValue; diff --git a/lib/Frontend/DependencyGraph.cpp b/lib/Frontend/DependencyGraph.cpp index 0ecea6f2ee..e128d91c40 100644 --- a/lib/Frontend/DependencyGraph.cpp +++ b/lib/Frontend/DependencyGraph.cpp @@ -31,15 +31,14 @@ class DependencyGraphCallback : public PPCallbacks { std::string OutputFile; std::string SysRoot; llvm::SetVector<const FileEntry *> AllFiles; - typedef llvm::DenseMap<const FileEntry *, - llvm::SmallVector<const FileEntry *, 2> > - DependencyMap; + typedef llvm::DenseMap<const FileEntry *, + SmallVector<const FileEntry *, 2> > DependencyMap; DependencyMap Dependencies; private: - llvm::raw_ostream &writeNodeReference(llvm::raw_ostream &OS, - const FileEntry *Node); + raw_ostream &writeNodeReference(raw_ostream &OS, + const FileEntry *Node); void OutputGraphFile(); public: @@ -93,8 +92,8 @@ void DependencyGraphCallback::InclusionDirective(SourceLocation HashLoc, AllFiles.insert(FromFile); } -llvm::raw_ostream & -DependencyGraphCallback::writeNodeReference(llvm::raw_ostream &OS, +raw_ostream & +DependencyGraphCallback::writeNodeReference(raw_ostream &OS, const FileEntry *Node) { OS << "header_" << Node->getUID(); return OS; diff --git a/lib/Frontend/DiagnosticRenderer.cpp b/lib/Frontend/DiagnosticRenderer.cpp index e5ac042da7..3b4f55c6c4 100644 --- a/lib/Frontend/DiagnosticRenderer.cpp +++ b/lib/Frontend/DiagnosticRenderer.cpp @@ -139,7 +139,7 @@ void DiagnosticRenderer::emitDiagnostic(SourceLocation Loc, SmallVector<CharSourceRange, 20> MutableRanges(Ranges.begin(), Ranges.end()); - llvm::SmallVector<FixItHint, 8> MergedFixits; + SmallVector<FixItHint, 8> MergedFixits; if (!FixItHints.empty()) { mergeFixits(FixItHints, *SM, LangOpts, MergedFixits); FixItHints = MergedFixits; diff --git a/lib/Frontend/LayoutOverrideSource.cpp b/lib/Frontend/LayoutOverrideSource.cpp index e0232503df..9309661972 100644 --- a/lib/Frontend/LayoutOverrideSource.cpp +++ b/lib/Frontend/LayoutOverrideSource.cpp @@ -26,7 +26,7 @@ static std::string parseName(StringRef S) { return S.substr(0, Offset).str(); } -LayoutOverrideSource::LayoutOverrideSource(llvm::StringRef Filename) { +LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { std::ifstream Input(Filename.str().c_str()); if (!Input.is_open()) return; @@ -188,7 +188,7 @@ LayoutOverrideSource::layoutRecordType(const RecordDecl *Record, } void LayoutOverrideSource::dump() { - llvm::raw_ostream &OS = llvm::errs(); + raw_ostream &OS = llvm::errs(); for (llvm::StringMap<Layout>::iterator L = Layouts.begin(), LEnd = Layouts.end(); L != LEnd; ++L) { diff --git a/lib/Frontend/SerializedDiagnosticPrinter.cpp b/lib/Frontend/SerializedDiagnosticPrinter.cpp index 26915e5f77..8eb0e40b01 100644 --- a/lib/Frontend/SerializedDiagnosticPrinter.cpp +++ b/lib/Frontend/SerializedDiagnosticPrinter.cpp @@ -44,8 +44,8 @@ public: } }; -typedef llvm::SmallVector<uint64_t, 64> RecordData; -typedef llvm::SmallVectorImpl<uint64_t> RecordDataImpl; +typedef SmallVector<uint64_t, 64> RecordData; +typedef SmallVectorImpl<uint64_t> RecordDataImpl; class SDiagsWriter; @@ -92,11 +92,11 @@ class SDiagsWriter : public DiagnosticConsumer { struct SharedState; - explicit SDiagsWriter(llvm::IntrusiveRefCntPtr<SharedState> State) + explicit SDiagsWriter(IntrusiveRefCntPtr<SharedState> State) : LangOpts(0), OriginalInstance(false), State(State) { } public: - SDiagsWriter(llvm::raw_ostream *os, DiagnosticOptions *diags) + SDiagsWriter(raw_ostream *os, DiagnosticOptions *diags) : LangOpts(0), OriginalInstance(true), State(new SharedState(os, diags)) { EmitPreamble(); @@ -190,12 +190,12 @@ private: /// \brief State that is shared among the various clones of this diagnostic /// consumer. - struct SharedState : llvm::RefCountedBase<SharedState> { - SharedState(llvm::raw_ostream *os, DiagnosticOptions *diags) + struct SharedState : RefCountedBase<SharedState> { + SharedState(raw_ostream *os, DiagnosticOptions *diags) : DiagOpts(diags), Stream(Buffer), OS(os), EmittedAnyDiagBlocks(false) { } /// \brief Diagnostic options. - llvm::IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; + IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts; /// \brief The byte buffer for the serialized content. SmallString<1024> Buffer; @@ -204,7 +204,7 @@ private: llvm::BitstreamWriter Stream; /// \brief The name of the diagnostics file. - OwningPtr<llvm::raw_ostream> OS; + OwningPtr<raw_ostream> OS; /// \brief The set of constructed record abbreviations. AbbreviationMap Abbrevs; @@ -221,7 +221,7 @@ private: /// \brief The collection of files used. llvm::DenseMap<const char *, unsigned> Files; - typedef llvm::DenseMap<const void *, std::pair<unsigned, llvm::StringRef> > + typedef llvm::DenseMap<const void *, std::pair<unsigned, StringRef> > DiagFlagsTy; /// \brief Map for uniquing strings. @@ -234,14 +234,13 @@ private: }; /// \brief State shared among the various clones of this diagnostic consumer. - llvm::IntrusiveRefCntPtr<SharedState> State; + IntrusiveRefCntPtr<SharedState> State; }; } // end anonymous namespace namespace clang { namespace serialized_diags { -DiagnosticConsumer *create(llvm::raw_ostream *OS, - DiagnosticOptions *diags) { +DiagnosticConsumer *create(raw_ostream *OS, DiagnosticOptions *diags) { return new SDiagsWriter(OS, diags); } } // end namespace serialized_diags diff --git a/lib/Frontend/Warnings.cpp b/lib/Frontend/Warnings.cpp index 0d678ad53f..b4c6b0bd73 100644 --- a/lib/Frontend/Warnings.cpp +++ b/lib/Frontend/Warnings.cpp @@ -75,7 +75,7 @@ void clang::ProcessWarningOptions(DiagnosticsEngine &Diags, else Diags.setExtensionHandlingBehavior(DiagnosticsEngine::Ext_Ignore); - llvm::SmallVector<diag::kind, 10> _Diags; + SmallVector<diag::kind, 10> _Diags; const IntrusiveRefCntPtr< DiagnosticIDs > DiagIDs = Diags.getDiagnosticIDs(); // We parse the warning options twice. The first pass sets diagnostic state, |