[K/N] Add trivial test for llvm.objc.clang.arc.use lowering
This commit is contained in:
committed by
TeamCityServer
parent
690d0689a1
commit
9dd8266bee
@@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
// We don't do anything meaningful here, because the test is actually checks
|
||||
// how compiler handles external bitcode (see main.ll). So this file is needed only for compiler invocation.
|
||||
fun main() {
|
||||
println("ok")
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
; Prevent function from DCE
|
||||
@llvm.compiler.used = appending global [1 x i8*] [ i8* bitcast (void (i8*, i8*)* @test to i8*) ], section "llvm.metadata"
|
||||
|
||||
declare void @llvm.objc.clang.arc.use(...) nounwind
|
||||
|
||||
define void @test(i8* %a, i8* %b) {
|
||||
call void (...) @llvm.objc.clang.arc.use(i8* %a, i8* %b) nounwind
|
||||
ret void
|
||||
}
|
||||
Reference in New Issue
Block a user