[cfe-commits] r131080 - in /cfe/trunk: lib/Basic/Targets.cpp test/Sema/builtins-arm.c
John McCall
rjmccall at apple.com
Sun May 8 19:19:37 PDT 2011
Author: rjmccall
Date: Sun May 8 21:19:37 2011
New Revision: 131080
URL: http://llvm.org/viewvc/llvm-project?rev=131080&view=rev
Log:
__builtin_va_list is void* on ARM, not char*.
rdar://problem/9391966
Modified:
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/test/Sema/builtins-arm.c
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=131080&r1=131079&r2=131080&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun May 8 21:19:37 2011
@@ -2020,7 +2020,7 @@
NumRecords = clang::ARM::LastTSBuiltin-Builtin::FirstTSBuiltin;
}
virtual const char *getVAListDeclaration() const {
- return "typedef char* __builtin_va_list;";
+ return "typedef void* __builtin_va_list;";
}
virtual void getGCCRegNames(const char * const *&Names,
unsigned &NumNames) const;
Modified: cfe/trunk/test/Sema/builtins-arm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/builtins-arm.c?rev=131080&r1=131079&r2=131080&view=diff
==============================================================================
--- cfe/trunk/test/Sema/builtins-arm.c (original)
+++ cfe/trunk/test/Sema/builtins-arm.c Sun May 8 21:19:37 2011
@@ -9,3 +9,8 @@
void __clear_cache(void*, void*);
#endif
+// va_list on ARM is void*.
+void test2() {
+ __builtin_va_list ptr = "x";
+ *ptr = '0'; // expected-error {{incomplete type 'void' is not assignable}}
+}
More information about the cfe-commits
mailing list