]> granicus.if.org Git - clang/commit
CodeGen: Unify handling guard variables in the Itanium C++ ABI
authorJustin Bogner <mail@justinbogner.com>
Wed, 23 Apr 2014 01:50:10 +0000 (01:50 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 23 Apr 2014 01:50:10 +0000 (01:50 +0000)
commit8e180fea6b697173ff706a77fff5bf5ed54cac36
treedd70bd11528cbf7463bf29ce7190231c4cd5c9f5
parent8c645f871a55109d178d6b826869bf4de2e9d554
CodeGen: Unify handling guard variables in the Itanium C++ ABI

We previously treated ARM separately from the generic Itanium ABI for
initializing guard variables. This code duplication led to things like
the ARM path missing the memory barrier for threadsafe handling, and a
highly misleading comment about how we were (mis)using the generic ABI
for ARM64 when really it went through the ARM codepath.

This unifies the two code paths. Functionally, this changes the ARM
and ARM64 codepath to use one byte loads instead of 4 and 8,
respectively, and adds the missing atomic acquire to these loads.
Other architectures are unchanged.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206937 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/aarch64-cxxabi.cpp
test/CodeGenCXX/arm.cpp