summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/atomic.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-07-18 20:54:12 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-07-18 20:54:12 +0000
commit3973af797abcd03222027baf26aac2927df154ea (patch)
treeb31c684e62be59b6602a1245fc9598919735eeca /clang/test/CodeGen/atomic.c
parentf8340deacd3f79b0e3c6bf60fcb8653cf683dd2f (diff)
downloadbcm5719-llvm-3973af797abcd03222027baf26aac2927df154ea.tar.gz
bcm5719-llvm-3973af797abcd03222027baf26aac2927df154ea.zip
Fix a goof in my previous patch -- not all of the builtins return a value, some
fixed return types. llvm-svn: 108657
Diffstat (limited to 'clang/test/CodeGen/atomic.c')
-rw-r--r--clang/test/CodeGen/atomic.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/test/CodeGen/atomic.c b/clang/test/CodeGen/atomic.c
index 8b66bfd6600..d0a7e04eaa9 100644
--- a/clang/test/CodeGen/atomic.c
+++ b/clang/test/CodeGen/atomic.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 > %t1
-// RUN: grep @llvm.memory.barrier %t1 | count 40
+// RUN: grep @llvm.memory.barrier %t1 | count 42
// RUN: grep @llvm.atomic.load.add.i32 %t1 | count 3
// RUN: grep @llvm.atomic.load.sub.i8 %t1 | count 2
// RUN: grep @llvm.atomic.load.min.i32 %t1
@@ -7,7 +7,7 @@
// RUN: grep @llvm.atomic.load.umin.i32 %t1
// RUN: grep @llvm.atomic.load.umax.i32 %t1
// RUN: grep @llvm.atomic.swap.i32 %t1
-// RUN: grep @llvm.atomic.cmp.swap.i32 %t1 | count 4
+// RUN: grep @llvm.atomic.cmp.swap.i32 %t1 | count 5
// RUN: grep @llvm.atomic.load.and.i32 %t1
// RUN: grep @llvm.atomic.load.or.i8 %t1
// RUN: grep @llvm.atomic.load.xor.i8 %t1
@@ -47,10 +47,15 @@ int atomic(void)
if ( __sync_val_compare_and_swap(&valb, 0, 1)) {
old = 42;
}
-
+ __sync_bool_compare_and_swap((void **)0, (void *)0, (void *)0);
__sync_lock_release(&val);
__sync_synchronize ();
return old;
}
+
+void release_return(int *lock) {
+ // Ensure this is actually returning void all the way through.
+ return __sync_lock_release(lock);
+}
OpenPOWER on IntegriCloud