Go to file
Alex Lorenz f50d1aca99 [ObjC] Messages to 'self' in class methods that return 'instancetype' should
use the pointer to the class as the result type of the message

Prior to this commit, messages to self in class methods were treated as instance
methods to a Class value. When these methods returned instancetype the compiler
only saw id through the instancetype, and not the Interface *. This caused
problems when that return value was a receiver in a message send, as the
compiler couldn't select the right method declaration and had to rely on a
selection from the global method pool.

This commit modifies the semantics of such message sends and uses class messages
that are dispatched to the interface that corresponds to the class that contains
the class method. This ensures that instancetypes are correctly interpreted by
the compiler. This change is safe under ARC (as self can't be reassigned),
however, it also applies to MRR code as we are assuming that the user isn't
doing anything unreasonable.

rdar://20940997

Differential Revision: https://reviews.llvm.org/D36790

llvm-svn: 349841
2018-12-20 22:11:11 +00:00
clang [ObjC] Messages to 'self' in class methods that return 'instancetype' should 2018-12-20 22:11:11 +00:00
clang-tools-extra [clangd] Try to workaround test failure by increasing the timeouts 2018-12-20 16:27:19 +00:00
compiler-rt [sanitizer] Support running without fd 0,1,2. 2018-12-20 20:36:33 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx [libcxx] Fix order checking in unordered_multimap tests. 2018-12-20 17:55:31 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [SEH] Add initial support for AArch64 2018-12-18 20:05:59 +00:00
lld [PPC64] Add toc-optimizations for got based relocations. 2018-12-20 17:00:33 +00:00
lldb [API] Remove redundants get() from smart pointers. NFC 2018-12-20 21:02:55 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm cmake: Remove add_llvm_loadable_module() 2018-12-20 22:04:08 +00:00
openmp [Tests] [OpenMP] XFAIL also for ppc64le. 2018-12-18 19:05:07 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
pstl [NFC][pstl] Re-run Clang-format on the whole repository 2018-12-20 20:28:56 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

The LLVM Compiler Infrastructure

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.