[PATCH] Fix initialization problems with PassRegistry
Zachary Turner
zturner at google.com
Wed Jun 11 11:54:41 PDT 2014
I might be able to solve the lock problem by just deleting the lock access from the destructor, as you mention, or making the lock an instance variable of the PassRegistry class. But I still think the way I've done is the only real way to solve the problem with the PassRegistrationListener.
Ultimately, the root of the problem is that ManagedStatics are being accessed during static initialization and shutdown. This needs to be prevented, and I think we need to try to get to a point where we can actually enforce, by way of asserts, that you cannot touch a ManagedStatic before main is entered or after it returns.
http://reviews.llvm.org/D3996
More information about the llvm-commits
mailing list