diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2015-02-14 01:48:17 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2015-02-14 01:48:17 +0000 |
| commit | 212af641f2b71dbc372b3cfb283b332116c68b26 (patch) | |
| tree | b79898a5b0d2e64f247809db17b4f7ed53658a9b /lib/CodeGen/CGExprComplex.cpp | |
| parent | 1fc307f60cc61c65138624c49a702ac572acad45 (diff) | |
| download | clang-212af641f2b71dbc372b3cfb283b332116c68b26.tar.gz | |
CodeGen: _Atomic(_Complex) shouldn't crash
We could be a little kinder if we did a compare-exchange loop instead of
an atomic-load/store pair.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprComplex.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index 1fea5a127c..e0ac08b1aa 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -820,6 +820,8 @@ EmitCompoundAssignLValue(const CompoundAssignOperator *E, TestAndClearIgnoreReal(); TestAndClearIgnoreImag(); QualType LHSTy = E->getLHS()->getType(); + if (const AtomicType *AT = LHSTy->getAs<AtomicType>()) + LHSTy = AT->getValueType(); BinOpInfo OpInfo; |
