Bob Wilson | 87b3a18 | 2013-06-18 05:36:04 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -triple thumbv7-apple-ios -target-abi aapcs -verify -fsyntax-only |
Tim Northover | 00853e5 | 2014-08-05 11:07:26 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 %s -triple thumbv7m-apple-macho -target-abi aapcs -verify -fsyntax-only |
Bob Wilson | 87b3a18 | 2013-06-18 05:36:04 +0000 | [diff] [blame] | 3 | // expected-no-diagnostics |
| 4 | |
| 5 | // ARM's AAPCS normally has size_t defined as unsigned int, but on Darwin |
| 6 | // some embedded targets use AAPCS with the iOS header files, which define |
| 7 | // size_t as unsigned long. Make sure that works. |
| 8 | typedef unsigned long size_t; |
| 9 | void* malloc(size_t); |
| 10 | void* operator new(size_t size) |
| 11 | { |
| 12 | return (malloc(size)); |
| 13 | } |