hanchenye-llvm-project/clang/include
Saleem Abdulrasool 94bb1a06fb CodeGen: correct arguments for NSFastEnumeration
When performing a NSFastEnumeration, the compiler synthesizes a call to
`countByEnumeratingWithState:objects:count:` where the `count` parameter
is of type `NSUInteger` and the return type is a `NSUInteger`.  We would
previously always use a `UnsignedLongTy` for the `NSUInteger` type.  On
32-bit targets, `long` is 32-bits which is the same as `unsigned int`.
Most 64-bit targets are LP64, where `long` is 64-bits.  However, on
LLP64 targets, such as Windows, `long` is 32-bits.  Introduce new
`getNSUIntegerType` and `getNSIntegerType` helpers to allow us to
determine the correct type for the `NSUInteger` type.  Wire those
through into the generation of the message dispatch to the selector.

llvm-svn: 312835
2017-09-08 23:41:17 +00:00
..
clang CodeGen: correct arguments for NSFastEnumeration 2017-09-08 23:41:17 +00:00
clang-c Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
CMakeLists.txt