[cfe-commits] r45005 - in /cfe/trunk/Driver: TranslationUnit.cpp TranslationUnit.h

Ted Kremenek kremenek at apple.com
Thu Dec 13 09:54:02 PST 2007


Author: kremenek
Date: Thu Dec 13 11:54:02 2007
New Revision: 45005

URL: http://llvm.org/viewvc/llvm-project?rev=45005&view=rev
Log:
Changed set of top-level decls from a list to a vector.

Modified:
    cfe/trunk/Driver/TranslationUnit.cpp
    cfe/trunk/Driver/TranslationUnit.h

Modified: cfe/trunk/Driver/TranslationUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/TranslationUnit.cpp?rev=45005&r1=45004&r2=45005&view=diff

==============================================================================
--- cfe/trunk/Driver/TranslationUnit.cpp (original)
+++ cfe/trunk/Driver/TranslationUnit.cpp Thu Dec 13 11:54:02 2007
@@ -1,4 +1,4 @@
-//===--- TranslationUnit.cpp - Abstraccction for Translation Units --------===//
+//===--- TranslationUnit.cpp - Abstraction for Translation Units ----------===//
 //
 //                     The LLVM Compiler Infrastructure
 //

Modified: cfe/trunk/Driver/TranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/TranslationUnit.h?rev=45005&r1=45004&r2=45005&view=diff

==============================================================================
--- cfe/trunk/Driver/TranslationUnit.h (original)
+++ cfe/trunk/Driver/TranslationUnit.h Thu Dec 13 11:54:02 2007
@@ -16,7 +16,7 @@
 #include "clang/Basic/LangOptions.h"
 #include "llvm/Bitcode/SerializationFwd.h"
 #include "llvm/System/Path.h"
-#include <list>
+#include <vector>
 
 namespace clang {
  
@@ -31,7 +31,7 @@
 class TranslationUnit {
   LangOptions LangOpts;
   ASTContext* Context;
-  std::list<Decl*> TopLevelDecls;
+  std::vector<Decl*> TopLevelDecls;
 
   explicit TranslationUnit() : Context(NULL) {}
   
@@ -68,11 +68,11 @@
     TopLevelDecls.push_back(d);
   }
   
-  typedef std::list<Decl*>::iterator iterator;  
+  typedef std::vector<Decl*>::iterator iterator;  
   iterator begin() { return TopLevelDecls.begin(); }
   iterator end() { return TopLevelDecls.end(); }
   
-  typedef std::list<Decl*>::const_iterator const_iterator;  
+  typedef std::vector<Decl*>::const_iterator const_iterator;  
   const_iterator begin() const { return TopLevelDecls.begin(); }
   const_iterator end() const { return TopLevelDecls.end(); }  
 };





More information about the cfe-commits mailing list