diff options
author | Chris Lattner <sabre@nondot.org> | 2009-09-08 18:19:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-09-08 18:19:27 +0000 |
commit | 0c7973655375698d5eada54f743991c460919e3a (patch) | |
tree | 6bac192b6cd75b459694bfcde4562e8f4ccf634c /clang/lib/Frontend/PCHReader.cpp | |
parent | 926fc3d68dbbfbd9f80c09616d01f15bd483731d (diff) | |
download | bcm5719-llvm-0c7973655375698d5eada54f743991c460919e3a.tar.gz bcm5719-llvm-0c7973655375698d5eada54f743991c460919e3a.zip |
Fix PR4922, where Sema would complete tentative definitions in nondeterminstic
order because it was doing so while iterating over a densemap.
There are still similar problems in other places, for example
WeakUndeclaredIdentifiers is still written to the PCH file in a nondeterminstic
order, and we emit warnings about #pragma weak in nondeterminstic order.
llvm-svn: 81236
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHReader.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index a7e6c0c8f9e..f4d06c068bd 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -2225,6 +2225,7 @@ void PCHReader::InitializeSema(Sema &S) { for (unsigned I = 0, N = TentativeDefinitions.size(); I != N; ++I) { VarDecl *Var = cast<VarDecl>(GetDecl(TentativeDefinitions[I])); SemaObj->TentativeDefinitions[Var->getDeclName()] = Var; + SemaObj->TentativeDefinitionList.push_back(Var->getDeclName()); } // If there were any locally-scoped external declarations, |