tblgen: Diagnose duplicate includes.
authorSean Silva <silvas@purdue.edu>
Thu, 7 Feb 2013 04:30:39 +0000 (04:30 +0000)
committerSean Silva <silvas@purdue.edu>
Thu, 7 Feb 2013 04:30:39 +0000 (04:30 +0000)
commita170f520a990a50c35f72d81b4415dc4c3ec50de
tree084dfdbf7d3e80652163e3fa993cd57aff148c5c
parent65c46b0cff2a7bcefff9b58895cdf8d710e3b6f7
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
lib/TableGen/TGLexer.cpp
lib/TableGen/TGLexer.h
lib/TableGen/TGParser.h