mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 12:16:08 +00:00

\#92331 tried to make `ObjCARCContractPass` by default, but it caused a
regression on O0 builds and was reverted.
This patch trys to bring that back by:
1. reverts the
[revert](1579e9ca9c
).
2. `createObjCARCContractPass` only on optimized builds.
Tests are updated to refelect the changes. Specifically, all `O0` tests
should not include `ObjCARCContractPass`
Signed-off-by: Peter Rong <PeterRong@meta.com>
20 lines
592 B
LLVM
20 lines
592 B
LLVM
; RUN: opt -thinlto-bc -o %t.o %s
|
|
|
|
; RUN: llvm-lto2 run -thinlto-distributed-indexes %t.o \
|
|
; RUN: -o %t2.index \
|
|
; RUN: -r=%t.o,_use_arc,px
|
|
|
|
; RUN: %clang_cc1 -O2 -triple x86_64-apple-darwin \
|
|
; RUN: -emit-obj -fthinlto-index=%t.o.thinlto.bc \
|
|
; RUN: -o %t.native.o -x ir %t.o
|
|
|
|
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-apple-darwin"
|
|
|
|
define void @use_arc(ptr %a, ptr %b) {
|
|
call void (...) @llvm.objc.clang.arc.use(ptr %a, ptr %b) nounwind
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.objc.clang.arc.use(...) nounwind
|