From: Ted Kremenek Date: Thu, 13 Dec 2007 17:54:02 +0000 (+0000) Subject: Changed set of top-level decls from a list to a vector. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc9270981e697cbaa2dd1a0e29b0599e556f61ce;p=clang Changed set of top-level decls from a list to a vector. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45005 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/Driver/TranslationUnit.cpp b/Driver/TranslationUnit.cpp index 398afb0666..2507d244a1 100644 --- a/Driver/TranslationUnit.cpp +++ b/Driver/TranslationUnit.cpp @@ -1,4 +1,4 @@ -//===--- TranslationUnit.cpp - Abstraccction for Translation Units --------===// +//===--- TranslationUnit.cpp - Abstraction for Translation Units ----------===// // // The LLVM Compiler Infrastructure // diff --git a/Driver/TranslationUnit.h b/Driver/TranslationUnit.h index b22ec469f5..e0fcdb431d 100644 --- a/Driver/TranslationUnit.h +++ b/Driver/TranslationUnit.h @@ -16,7 +16,7 @@ #include "clang/Basic/LangOptions.h" #include "llvm/Bitcode/SerializationFwd.h" #include "llvm/System/Path.h" -#include +#include namespace clang { @@ -31,7 +31,7 @@ class Decl; class TranslationUnit { LangOptions LangOpts; ASTContext* Context; - std::list TopLevelDecls; + std::vector TopLevelDecls; explicit TranslationUnit() : Context(NULL) {} @@ -68,11 +68,11 @@ public: TopLevelDecls.push_back(d); } - typedef std::list::iterator iterator; + typedef std::vector::iterator iterator; iterator begin() { return TopLevelDecls.begin(); } iterator end() { return TopLevelDecls.end(); } - typedef std::list::const_iterator const_iterator; + typedef std::vector::const_iterator const_iterator; const_iterator begin() const { return TopLevelDecls.begin(); } const_iterator end() const { return TopLevelDecls.end(); } };