diff options
author | Sean Silva <silvas@purdue.edu> | 2013-02-07 04:30:39 +0000 |
---|---|---|
committer | Sean Silva <silvas@purdue.edu> | 2013-02-07 04:30:39 +0000 |
commit | 3b96424c43132cf8e78b6b599c7463e6e6191330 (patch) | |
tree | 77a0c452725dd6c0f5c388d310aacad5d0fb9907 /llvm/lib/TableGen/TGParser.h | |
parent | 697d8b9a2679cd2308deb098792a5b25b9ba0668 (diff) | |
download | bcm5719-llvm-3b96424c43132cf8e78b6b599c7463e6e6191330.tar.gz bcm5719-llvm-3b96424c43132cf8e78b6b599c7463e6e6191330.zip |
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.
llvm-svn: 174582
Diffstat (limited to 'llvm/lib/TableGen/TGParser.h')
-rw-r--r-- | llvm/lib/TableGen/TGParser.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/TableGen/TGParser.h b/llvm/lib/TableGen/TGParser.h index e55805d5525..044e3a02ba4 100644 --- a/llvm/lib/TableGen/TGParser.h +++ b/llvm/lib/TableGen/TGParser.h @@ -96,7 +96,7 @@ public: bool TokError(const Twine &Msg) const { return Error(Lex.getLoc(), Msg); } - const std::vector<std::string> &getDependencies() const { + const TGLexer::DependenciesMapTy &getDependencies() const { return Lex.getDependencies(); } |