diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-04-11 23:20:28 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2011-04-11 23:20:28 +0000 |
commit | 408c2283672a75352e81fa2d32520ffc71b65b47 (patch) | |
tree | 66af275bc4cda34e397c35b2ed39d45a787169fe /llvm/utils | |
parent | e81d045d942d303a28fc19efe19c0b8fff3472cc (diff) | |
download | bcm5719-llvm-408c2283672a75352e81fa2d32520ffc71b65b47.tar.gz bcm5719-llvm-408c2283672a75352e81fa2d32520ffc71b65b47.zip |
TableGen: Keep the order of DECL_CONTEXT() for DeclNodes.td. RecordVector may be used instead of RecordSet.
The result of DeclNodes.inc was unstable on msys, Windows 7 x64.
llvm-svn: 129317
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/ClangASTNodesEmitter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/llvm/utils/TableGen/ClangASTNodesEmitter.cpp b/llvm/utils/TableGen/ClangASTNodesEmitter.cpp index 187ab467999..d9d5a3ccd90 100644 --- a/llvm/utils/TableGen/ClangASTNodesEmitter.cpp +++ b/llvm/utils/TableGen/ClangASTNodesEmitter.cpp @@ -155,10 +155,13 @@ void ClangDeclContextEmitter::run(raw_ostream &OS) { } } - for (RecordSet::iterator i = DeclContexts.begin(), e = DeclContexts.end(); - i != e; ++i) { - OS << "DECL_CONTEXT(" << (*i)->getName() << ")\n"; - } + // To keep identical order, RecordVector may be used + // instead of RecordSet. + for (RecordVector::iterator + i = DeclContextsVector.begin(), e = DeclContextsVector.end(); + i != e; ++i) + if (DeclContexts.find(*i) != DeclContexts.end()) + OS << "DECL_CONTEXT(" << (*i)->getName() << ")\n"; OS << "#undef DECL_CONTEXT\n"; OS << "#undef DECL_CONTEXT_BASE\n"; |