diff options
author | John McCall <rjmccall@apple.com> | 2010-08-24 17:40:45 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-24 17:40:45 +0000 |
commit | aab0132698c7550d0095986fb1fb4887bf18c3e8 (patch) | |
tree | 11b2415888166650ccef037481a1e2368eaaa162 | |
parent | ca0e0545c216afaacba6da6c82a270dc2efc4e3f (diff) |
Sema doesn't need these STL headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Sema/Sema.h | 11 | ||||
-rw-r--r-- | lib/Sema/Sema.cpp | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index c9c4347eb3..3991bce7e1 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -27,10 +27,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/OwningPtr.h" #include <deque> -#include <list> -#include <map> #include <string> -#include <vector> namespace llvm { class APSInt; @@ -343,11 +340,11 @@ public: llvm::DenseMap<DeclarationName, NamedDecl *> LocallyScopedExternalDecls; /// \brief All the tentative definitions encountered in the TU. - std::vector<VarDecl *> TentativeDefinitions; + llvm::SmallVector<VarDecl *, 2> TentativeDefinitions; /// \brief The set of file scoped decls seen so far that have not been used /// and must warn if not used. Only contains the first declaration. - std::vector<const DeclaratorDecl*> UnusedFileScopedDecls; + llvm::SmallVector<const DeclaratorDecl*, 4> UnusedFileScopedDecls; class AccessedEntity { public: @@ -536,11 +533,11 @@ public: /// \brief The set of declarations that have been referenced within /// a potentially evaluated expression. - typedef std::vector<std::pair<SourceLocation, Decl *> > + typedef llvm::SmallVector<std::pair<SourceLocation, Decl *>, 10> PotentiallyReferencedDecls; /// \brief A set of diagnostics that may be emitted. - typedef std::vector<std::pair<SourceLocation, PartialDiagnostic> > + typedef llvm::SmallVector<std::pair<SourceLocation, PartialDiagnostic>, 10> PotentiallyEmittedDiagnostics; /// \brief Data structure used to record current or nested diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 7c0006b7b3..569f4edf4a 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -371,7 +371,7 @@ void Sema::ActOnEndOfTranslationUnit() { } // Output warning for unused file scoped decls. - for (std::vector<const DeclaratorDecl*>::iterator + for (llvm::SmallVectorImpl<const DeclaratorDecl*>::iterator I = UnusedFileScopedDecls.begin(), E = UnusedFileScopedDecls.end(); I != E; ++I) { if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(*I)) { |