On Tue, Mar 24, 2015 at 5:34 PM, Chandler Carruth <[email protected]> wrote:
> Author: chandlerc > Date: Tue Mar 24 19:34:51 2015 > New Revision: 233156 > > URL: http://llvm.org/viewvc/llvm-project?rev=233156&view=rev > Log: > [Modules] When writing out the on-disk hash table for the decl context > lookup tables, we need to establish a stable ordering for constructing > the hash table. This is trickier than it might seem. > > Most of these cases are easily handled by sorting the lookup results > associated with a specific name that has an identifier. However for > constructors and conversion functions, the story is more complicated. > Here we need to merge all of the constructors or conversion functions > together and this merge needs to be stable. We don't have any stable > ordering for either constructors or conversion functions as both would > require a stable ordering across types. > > Instead, when we have constructors or conversion functions in the > results, we reconstruct a stable order by walking the decl context in > lexical order and merging them in the order their particular declaration > names are encountered. This doesn't generalize as there might be found > declaration names which don't actually occur within the lexical context, > but for constructors and conversion functions it is safe. It does > require loading the entire decl context if necessary to establish the > ordering but there doesn't seem to be a meaningful way around that. > > Many thanks to Richard for talking through all of the design choices > here. While I wrote the code, he guided all the actual decisions about > how to establish the order of things. > > No test case yet because the test case I have doesn't pass yet -- there > are still more sources of non-determinism. However, this is complex > enough that I wanted it to go into its own commit in case it causes some > unforseen issue or needs to be reverted. > > This patch is causing several tests to fail. However, reverting also seems to cause a test to fail. Release build compiled with Clang Failing Tests (2): Clang :: Modules/cxx-decls.cpp Clang :: PCH/cxx11-inheriting-ctors.cpp Release build compiled with GCC Failing Tests (1): Clang :: PCH/cxx-method.cpp Debug build compiled with Clang with revision 233156 reverted Failing Tests (1): Clang :: Modules/stress1.cpp
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
