From a170f520a990a50c35f72d81b4415dc4c3ec50de Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 7 Feb 2013 04:30:39 +0000 Subject: tblgen: Diagnose duplicate includes. A double inclusion will pretty much always be an error in TableGen, so there's no point going on just to die with "def already defined" or whatnot. I'm not too thrilled about the "public: ... private: ..." to expose the DependenciesMapTy, but I really didn't see a better way to keep that type centralized. It's a smell that indicates that some refactoring is needed to make this code more loosely coupled. This should avoid all bugs of the same nature as PR15189. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174582 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/TableGen/Main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/TableGen/Main.cpp') diff --git a/lib/TableGen/Main.cpp b/lib/TableGen/Main.cpp index d0ca756016..e1cd623783 100644 --- a/lib/TableGen/Main.cpp +++ b/lib/TableGen/Main.cpp @@ -64,11 +64,11 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) { return 1; } DepOut.os() << OutputFilename << ":"; - const std::vector &Dependencies = Parser.getDependencies(); - for (std::vector::const_iterator I = Dependencies.begin(), - E = Dependencies.end(); + const TGLexer::DependenciesMapTy &Dependencies = Parser.getDependencies(); + for (TGLexer::DependenciesMapTy::const_iterator I = Dependencies.begin(), + E = Dependencies.end(); I != E; ++I) { - DepOut.os() << " " << (*I); + DepOut.os() << " " << I->first; } DepOut.os() << "\n"; DepOut.keep(); -- cgit v1.2.3-18-g5258