Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-08-16 16:54:44 +0300
committerFangrui Song <maskray@google.com>2019-08-16 16:54:44 +0300
commit6897f99314452a04be2e08058ef2f7a93053539f (patch)
treea1251f8755bc1fa540ae8cb59029271ab2b61359 /libcxxabi/src/cxa_guard_impl.h
parent6e1ac424742bcaa8fcb259676e8ae6a183a38543 (diff)
[libcxxabi] __cxa_guard_require: test guard byte with != 0 instead of == 1
llvm-svn: 369109
Diffstat (limited to 'libcxxabi/src/cxa_guard_impl.h')
-rw-r--r--libcxxabi/src/cxa_guard_impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h
index 545731b08182..98e42ba2fb0b 100644
--- a/libcxxabi/src/cxa_guard_impl.h
+++ b/libcxxabi/src/cxa_guard_impl.h
@@ -175,7 +175,7 @@ public:
/// Implements __cxa_guard_acquire
AcquireResult cxa_guard_acquire() {
AtomicInt<uint8_t> guard_byte(guard_byte_address);
- if (guard_byte.load(std::_AO_Acquire) == COMPLETE_BIT)
+ if (guard_byte.load(std::_AO_Acquire) != UNSET)
return INIT_IS_DONE;
return derived()->acquire_init_byte();
}