llvm-project/clang/lib/Basic/Targets
Akira Hatanaka fcbe17c6be [ObjC++] Make parameter passing and function return compatible with ObjC
ObjC and ObjC++ pass non-trivial structs in a way that is incompatible
with each other. For example:
    
typedef struct {
  id f0;
  __weak id f1;
} S;
    
// this code is compiled in c++.
extern "C" {
  void foo(S s);
}
    
void caller() {
  // the caller passes the parameter indirectly and destructs it.
  foo(S());
}
    
// this function is compiled in c.
// 'a' is passed directly and is destructed in the callee.
void foo(S a) {
}
    
This patch fixes the incompatibility by passing and returning structs
with __strong or weak fields using the C ABI in C++ mode. __strong and
__weak fields in a struct do not cause the struct to be destructed in
the caller and __strong fields do not cause the struct to be passed
indirectly.
    
Also, this patch fixes the microsoft ABI bug mentioned here:
    
https://reviews.llvm.org/D41039?id=128767#inline-364710
    
rdar://problem/38887866
    
Differential Revision: https://reviews.llvm.org/D44908

llvm-svn: 328731
2018-03-28 21:13:14 +00:00
..
AArch64.cpp [ARM] Pass half or i16 types for NEON intrinsics 2018-03-19 13:22:49 +00:00
AArch64.h Make march/target-cpu print a note with the list of valid values for ARM 2018-02-08 23:14:15 +00:00
AMDGPU.cpp AMDGPU: Update datalayout for stack alignment 2018-03-27 19:26:51 +00:00
AMDGPU.h [AMDGPU] Fix codegen for inline assembly 2018-03-23 19:43:42 +00:00
ARM.cpp Basic: support PreserveMost and PreserveAll on Windows ARM 2018-03-20 17:33:26 +00:00
ARM.h [ARM] Pass half or i16 types for NEON intrinsics 2018-03-19 13:22:49 +00:00
AVR.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
AVR.h [AVR] Set the program address space in the data layout 2018-02-19 10:46:16 +00:00
BPF.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
BPF.h bpf: Hook target feature "alu32" with LLVM 2018-02-23 23:55:29 +00:00
Hexagon.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Hexagon.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Lanai.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Le64.cpp
Le64.h
MSP430.cpp
MSP430.h
Mips.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Mips.h [RISCV] Enable __int128_t and __uint128_t through clang flag 2018-02-25 03:58:23 +00:00
NVPTX.cpp Add NVPTX Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:00 +00:00
NVPTX.h Add NVPTX Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:00 +00:00
Nios2.cpp
Nios2.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
OSTargets.cpp Toolchain: Normalize dwarf, sjlj and seh eh 2017-11-29 07:25:12 +00:00
OSTargets.h Correct the alignment for the PS4 target 2018-03-07 20:48:16 +00:00
PNaCl.cpp
PNaCl.h
PPC.cpp Fix UBSan issue with PPC::isValidCPUName 2018-02-09 00:13:49 +00:00
PPC.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
RISCV.cpp [RISCV] Add the RISCV target and compiler driver 2018-01-11 13:36:56 +00:00
RISCV.h [RISCV] Add the RISCV target and compiler driver 2018-01-11 13:36:56 +00:00
SPIR.cpp
SPIR.h [OpenMP] Show error if VLAs are not supported 2017-11-18 21:00:46 +00:00
Sparc.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
Sparc.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.cpp Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
SystemZ.h Add Rest of Targets Support to ValidCPUList (enabling march notes) 2018-02-08 23:16:55 +00:00
TCE.cpp
TCE.h [OpenCL] Add LangAS::opencl_private to represent private address space in AST 2017-10-13 03:37:48 +00:00
WebAssembly.cpp [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
WebAssembly.h [WebAssembly] Add exception handling option 2018-03-02 00:39:16 +00:00
X86.cpp [X86] Disable CLWB in Cannon Lake 2018-02-21 00:16:50 +00:00
X86.h [ObjC++] Make parameter passing and function return compatible with ObjC 2018-03-28 21:13:14 +00:00
XCore.cpp
XCore.h