Really fix the declaration of __clear_cache.

When I tested gcc's behaviour before, I forgot the extern "C", so it
would warn when the types *did* match.

So in the end
* __clear_cache takes two void pointers.
* aarch64 was correct before.
* libgcc's manual is wrong.
* this patch fixes arm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181810 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/BuiltinsAArch64.def b/include/clang/Basic/BuiltinsAArch64.def
index 939c080..9e9f6d0 100644
--- a/include/clang/Basic/BuiltinsAArch64.def
+++ b/include/clang/Basic/BuiltinsAArch64.def
@@ -15,4 +15,4 @@
 // The format of this database matches clang/Basic/Builtins.def.
 
 // In libgcc
-BUILTIN(__clear_cache, "vc*c*", "")
+BUILTIN(__clear_cache, "vv*v*", "")
diff --git a/include/clang/Basic/BuiltinsARM.def b/include/clang/Basic/BuiltinsARM.def
index 3dbeb0b..fad9007 100644
--- a/include/clang/Basic/BuiltinsARM.def
+++ b/include/clang/Basic/BuiltinsARM.def
@@ -15,7 +15,7 @@
 // The format of this database matches clang/Basic/Builtins.def.
 
 // In libgcc
-BUILTIN(__clear_cache, "vc*c*", "")
+BUILTIN(__clear_cache, "vv*v*", "")
 BUILTIN(__builtin_thread_pointer, "v*", "")
 
 // Saturating arithmetic
diff --git a/test/Sema/builtins-aarch64.c b/test/Sema/builtins-aarch64.c
index cc2a154..b055753 100644
--- a/test/Sema/builtins-aarch64.c
+++ b/test/Sema/builtins-aarch64.c
@@ -2,7 +2,7 @@
 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST1 -fsyntax-only -verify %s
 
 #ifdef TEST1
-void __clear_cache(char *start, char *end);
+void __clear_cache(void *start, void *end);
 #endif
 
 void test_clear_cache_chars(char *start, char *end) {
diff --git a/test/Sema/builtins-arm.c b/test/Sema/builtins-arm.c
index b516040..3ac1da0 100644
--- a/test/Sema/builtins-arm.c
+++ b/test/Sema/builtins-arm.c
@@ -2,14 +2,14 @@
 // RUN: %clang_cc1 -triple armv7 -target-abi apcs-gnu \
 // RUN:   -fsyntax-only -verify %s
 
-void f(char *a, char *b) {
-  __clear_cache(); // expected-error {{too few arguments to function call, expected 2, have 0}} // expected-note {{'__clear_cache' is a builtin with type 'void (char *, char *)}}
+void f(void *a, void *b) {
+  __clear_cache(); // expected-error {{too few arguments to function call, expected 2, have 0}} // expected-note {{'__clear_cache' is a builtin with type 'void (void *, void *)}}
   __clear_cache(a); // expected-error {{too few arguments to function call, expected 2, have 1}}
   __clear_cache(a, b);
 }
 
-void __clear_cache(void*, void*); // expected-error {{conflicting types for '__clear_cache'}}
-void __clear_cache(char*, char*);
+void __clear_cache(char*, char*); // expected-error {{conflicting types for '__clear_cache'}}
+void __clear_cache(void*, void*);
 
 #if defined(__ARM_PCS) || defined(__ARM_EABI__)
 // va_list on ARM AAPCS is struct { void* __ap }.