[cfe-commits] r111926 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Sema/Sema.cpp
John McCall
rjmccall at apple.com
Tue Aug 24 10:40:45 PDT 2010
Author: rjmccall
Date: Tue Aug 24 12:40:45 2010
New Revision: 111926
URL: http://llvm.org/viewvc/llvm-project?rev=111926&view=rev
Log:
Sema doesn't need these STL headers.
Modified:
cfe/trunk/include/clang/Sema/Sema.h
cfe/trunk/lib/Sema/Sema.cpp
Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=111926&r1=111925&r2=111926&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Tue Aug 24 12:40:45 2010
@@ -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 @@
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 @@
/// \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
Modified: cfe/trunk/lib/Sema/Sema.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/Sema.cpp?rev=111926&r1=111925&r2=111926&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/Sema.cpp (original)
+++ cfe/trunk/lib/Sema/Sema.cpp Tue Aug 24 12:40:45 2010
@@ -371,7 +371,7 @@
}
// 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)) {
More information about the cfe-commits
mailing list