From aa22a8cdcffc4aead057bb1d72e24c8a831a4389 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 10 Apr 2012 22:49:28 +0000 Subject: 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. llvm-svn: 154448 --- clang/test/CodeGen/atomic-ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'clang/test/CodeGen/atomic-ops.c') diff --git a/clang/test/CodeGen/atomic-ops.c b/clang/test/CodeGen/atomic-ops.c index 81406347735..2285cca7235 100644 --- a/clang/test/CodeGen/atomic-ops.c +++ b/clang/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 -- cgit v1.2.3