]> granicus.if.org Git - clang/commitdiff
Builtins/ARM: __clear_cache doesn't seem to have a consistent prototype, declare
authorDaniel Dunbar <daniel@zuster.org>
Fri, 16 Jul 2010 00:31:23 +0000 (00:31 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 16 Jul 2010 00:31:23 +0000 (00:31 +0000)
the builtin as void __clear_cache(...) to workaround this, which appears to
match what GCC does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108487 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/BuiltinsARM.def
test/CodeGen/builtins-arm.c
test/Sema/builtins-arm.c [new file with mode: 0644]

index 54e4c2b2083ad378448c646dd27c48f084b537af..60c59bc05bfbd7d7d451182dee713e4143405dfe 100644 (file)
@@ -15,7 +15,7 @@
 // The format of this database matches clang/Basic/Builtins.def.
 
 // In libgcc
-BUILTIN(__clear_cache, "vc*c*", "")
+BUILTIN(__clear_cache, "v.", "")
 BUILTIN(__builtin_thread_pointer, "v*", "")
 
 // NEON
index 546f57a4a18a3b7a71679b1c15321b86060f1b0b..09df1ef42c74f0b7f9486d62207275fff330c8c9 100644 (file)
@@ -9,4 +9,4 @@ void f1(char *a, char *b) {
        __clear_cache(a,b);
 }
 
-// CHECK: call void @__clear_cache
+// CHECK: call {{.*}} @__clear_cache
diff --git a/test/Sema/builtins-arm.c b/test/Sema/builtins-arm.c
new file mode 100644 (file)
index 0000000..4dd31e7
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple armv7 -fsyntax-only -verify -DTEST0 %s
+// RUN: %clang_cc1 -triple armv7 -fsyntax-only -verify -DTEST1 %s
+
+#ifdef TEST0
+void __clear_cache(char*, char*);
+#endif
+
+#ifdef TEST1
+void __clear_cache(void*, void*);
+#endif
+