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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129317 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2011-04-11 23:20:28 +00:00
parent b5f18f5df0
commit bd2907356d

View File

@ -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";