]> granicus.if.org Git - clang/commitdiff
Sema doesn't need these STL headers.
authorJohn McCall <rjmccall@apple.com>
Tue, 24 Aug 2010 17:40:45 +0000 (17:40 +0000)
committerJohn McCall <rjmccall@apple.com>
Tue, 24 Aug 2010 17:40:45 +0000 (17:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111926 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h
lib/Sema/Sema.cpp

index c9c4347eb340e2fd590e21821dd311d4ddab8afc..3991bce7e1b48d15db40cfe9f55dc29bf41fb1bc 100644 (file)
 #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
index 7c0006b7b3b8e207e59cd71c7ba0e16e6c294b38..569f4edf4ad3f291905b452f66863fa527b013fe 100644 (file)
@@ -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)) {