hanchenye-llvm-project/clang/lib
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
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
ASTMatchers Register linkageSpecDecl matcher 2017-08-31 21:18:27 +00:00
Analysis Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Basic [OpenCL] Add half load and store builtins 2017-09-07 19:39:10 +00:00
CodeGen CodeGen: correct arguments for NSFastEnumeration 2017-09-08 23:41:17 +00:00
Driver Fix validation of the -mthread-model flag in the Clang driver 2017-09-07 22:01:25 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Frontend Fix templated type alias completion when using global completion cache 2017-09-08 09:31:13 +00:00
FrontendTool Update after LLVM change r309087 2017-07-26 09:10:17 +00:00
Headers [CUDA] Added rudimentary support for CUDA-9 and sm_70. 2017-09-07 18:14:32 +00:00
Index Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Lex Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Parse Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Serialization Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
StaticAnalyzer [CSA] [NFC] Move AnalysisContext.h to AnalysisDeclContext.h 2017-09-06 21:45:03 +00:00
Tooling Recommit r312127: [refactor] AST selection tree should contain syntactic 2017-08-30 15:28:01 +00:00
CMakeLists.txt