]> granicus.if.org Git - clang/commitdiff
Changed set of top-level decls from a list to a vector.
authorTed Kremenek <kremenek@apple.com>
Thu, 13 Dec 2007 17:54:02 +0000 (17:54 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 13 Dec 2007 17:54:02 +0000 (17:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45005 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/TranslationUnit.cpp
Driver/TranslationUnit.h

index 398afb066628d54147375e65bfbae8400fe64421..2507d244a18d57c12656fc36e6cd384b1efee87d 100644 (file)
@@ -1,4 +1,4 @@
-//===--- TranslationUnit.cpp - Abstraccction for Translation Units --------===//
+//===--- TranslationUnit.cpp - Abstraction for Translation Units ----------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
index b22ec469f53e5af6d5a49740bbc37448f8410981..e0fcdb431dfba7ea9e3784181f3f88bb0cb38191 100644 (file)
@@ -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 Decl;
 class TranslationUnit {
   LangOptions LangOpts;
   ASTContext* Context;
-  std::list<Decl*> TopLevelDecls;
+  std::vector<Decl*> TopLevelDecls;
 
   explicit TranslationUnit() : Context(NULL) {}
   
@@ -68,11 +68,11 @@ public:
     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(); }  
 };