mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Since PassRegistry is currently a shared global object, it needs locking. While it might intuitively seem
that all the setup of this class currently happens at static initialization time, this misses the fact that some later events can cause mutation of the PassRegistrationListeners list, and thus cause race issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#define LLVM_PASSREGISTRY_H
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/System/Mutex.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@@ -32,6 +33,7 @@ struct PassRegistrationListener;
|
||||
/// each thread.
|
||||
class PassRegistry {
|
||||
mutable void *pImpl;
|
||||
mutable sys::SmartMutex<true> Lock;
|
||||
void *getImpl() const;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user