1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Transforms/ObjCARC
ahatanak 00ab8cc01c [ObjC][ARC] Don't remove autoreleaseRV/retainRV pairs if the call isn't
a tail call

Previosly ARC optimizer removed the autoreleaseRV/retainRV pair in the
following code, which caused the object returned by @something to be
placed in the autorelease pool because the call to @something isn't a
tail call:

```
  %call = call i8* @something(...)
  %2 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call)
  %3 = call i8* @objc_autoreleaseReturnValue(i8* %2)
  ret i8* %3
```

Fix the bug by checking whether @something is a tail call.

rdar://problem/59275894
2020-03-09 13:21:38 -07:00
..
ARCRuntimeEntryPoints.h
BlotMapVector.h
CMakeLists.txt
DependencyAnalysis.cpp
DependencyAnalysis.h
LLVMBuild.txt
ObjCARC.cpp
ObjCARC.h
ObjCARCAPElim.cpp
ObjCARCContract.cpp
ObjCARCExpand.cpp
ObjCARCOpts.cpp [ObjC][ARC] Don't remove autoreleaseRV/retainRV pairs if the call isn't 2020-03-09 13:21:38 -07:00
ProvenanceAnalysis.cpp
ProvenanceAnalysis.h
ProvenanceAnalysisEvaluator.cpp
PtrState.cpp
PtrState.h