summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/arm-clear.c
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-03-14 20:30:34 +0000
committerEric Christopher <echristo@apple.com>2011-03-14 20:30:34 +0000
commitcf5e83b47137873cbf79b51c7322026f469ef0ec (patch)
tree3f67c0ad8989874a51d632f62eaee48341ce0f36 /clang/test/CodeGen/arm-clear.c
parentc525e3a114b518ddb2316d68c728ad95599c0034 (diff)
downloadbcm5719-llvm-cf5e83b47137873cbf79b51c7322026f469ef0ec.tar.gz
bcm5719-llvm-cf5e83b47137873cbf79b51c7322026f469ef0ec.zip
__clear_cache() is varargs and people will occasionally write it without
arguments. Process only the arguments that people write, but process all of them. Fixes rdar://8900346 llvm-svn: 127616
Diffstat (limited to 'clang/test/CodeGen/arm-clear.c')
-rw-r--r--clang/test/CodeGen/arm-clear.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/test/CodeGen/arm-clear.c b/clang/test/CodeGen/arm-clear.c
new file mode 100644
index 00000000000..eda64ce99ee
--- /dev/null
+++ b/clang/test/CodeGen/arm-clear.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -w -o - %s | FileCheck %s
+
+void clear0(void *ptr) {
+ // CHECK: clear0
+ // CHECK-NOT: load i8**
+ __clear_cache();
+}
+
+void clear1(void *ptr) {
+ // CHECK: clear1
+ // CHECK: load i8**
+ // CHECK-NOT: load i8**
+ __clear_cache(ptr);
+}
+
+void clear2(void *ptr, void *ptr2) {
+ // CHECK: clear2
+ // CHECK: load i8**
+ // CHECK: load i8**
+ __clear_cache(ptr, ptr2);
+}
OpenPOWER on IntegriCloud