1e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson// RUN: %clang_cc1 %s -triple thumbv7-apple-ios -target-abi aapcs -verify -fsyntax-only 2176edba5311f6eff0cad2631449885ddf4fbc9eaStephen Hines// RUN: %clang_cc1 %s -triple thumbv7m-apple-macho -target-abi aapcs -verify -fsyntax-only 3e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson// expected-no-diagnostics 4e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson 5e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson// ARM's AAPCS normally has size_t defined as unsigned int, but on Darwin 6e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson// some embedded targets use AAPCS with the iOS header files, which define 7e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson// size_t as unsigned long. Make sure that works. 8e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilsontypedef unsigned long size_t; 9e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilsonvoid* malloc(size_t); 10e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilsonvoid* operator new(size_t size) 11e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson{ 12e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson return (malloc(size)); 13e4bce7a4250e3d646ceab372ebed71ca7e79cf28Bob Wilson} 14