-//===--- TranslationUnit.cpp - Abstraccction for Translation Units --------===//
+//===--- TranslationUnit.cpp - Abstraction for Translation Units ----------===//
//
// The LLVM Compiler Infrastructure
//
#include "clang/Basic/LangOptions.h"
#include "llvm/Bitcode/SerializationFwd.h"
#include "llvm/System/Path.h"
-#include <list>
+#include <vector>
namespace clang {
class TranslationUnit {
LangOptions LangOpts;
ASTContext* Context;
- std::list<Decl*> TopLevelDecls;
+ std::vector<Decl*> TopLevelDecls;
explicit TranslationUnit() : Context(NULL) {}
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(); }
};