summaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-10 22:49:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-10 22:49:28 +0000
commite1b2abc2ed3f2c98985b06b4ad01c977bd584020 (patch)
tree00c5639500ef04b3f6555f66d8e790513d935632 /test/CodeGen
parentedec2ee3bcde5ade31a76e329dcc4ac0fa7c7d11 (diff)
AtomicExpr: make ASTStmtReader a friend and remove setters. Also fix saving
of an uninitialized Stmt* in serialization of __atomic_init and add a test of atomics serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154448 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/atomic-ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/atomic-ops.c b/test/CodeGen/atomic-ops.c
index 8140634773..2285cca723 100644
--- a/test/CodeGen/atomic-ops.c
+++ b/test/CodeGen/atomic-ops.c
@@ -1,5 +1,12 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 | FileCheck %s
+// Also test serialization of atomic operations here, to avoid duplicating the
+// test.
+// RUN: %clang_cc1 %s -emit-pch -o %t -triple=i686-apple-darwin9
+// RUN: %clang_cc1 %s -include-pch %t -triple=i686-apple-darwin9 -emit-llvm -o - | FileCheck %s
+#ifndef ALREADY_INCLUDED
+#define ALREADY_INCLUDED
+
// Basic IRGen tests for __atomic_*
// FIXME: Need to implement __atomic_is_lock_free
@@ -117,3 +124,5 @@ int structAtomicCmpExchange() {
return __atomic_compare_exchange_strong(&bigAtomic, &f, g, 5, 5);
// CHECK: call zeroext i1 @__atomic_compare_exchange(i32 512, i8* bitcast (%struct.foo* @bigAtomic to i8*),
}
+
+#endif