mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Fix the double checked locking in this file too.
llvm-svn: 73703
This commit is contained in:
parent
a74e3d8a1c
commit
7d2d5c974e
@ -455,12 +455,14 @@ void DerivedType::dropAllTypeUses() {
|
||||
// that will never get resolved, thus will always be abstract.
|
||||
static Type *AlwaysOpaqueTy = 0;
|
||||
static PATypeHolder* Holder = 0;
|
||||
if (!AlwaysOpaqueTy) {
|
||||
Type *tmp = AlwaysOpaqueTy;
|
||||
sys::MemoryFence();
|
||||
if (!tmp) {
|
||||
if (llvm_is_multithreaded()) {
|
||||
llvm_acquire_global_lock();
|
||||
|
||||
if (!AlwaysOpaqueTy) {
|
||||
Type *tmp = OpaqueType::get();
|
||||
tmp = AlwaysOpaqueTy;
|
||||
if (!tmp) {
|
||||
tmp = OpaqueType::get();
|
||||
PATypeHolder* tmp2 = new PATypeHolder(AlwaysOpaqueTy);
|
||||
sys::MemoryFence();
|
||||
AlwaysOpaqueTy = tmp;
|
||||
|
Loading…
Reference in New Issue
Block a user