Files
kotlin-fork/kotlin-native/backend.native/tests/filecheck/escape_analysis.kt
T
Sergey Bogolepov b9bb56d9c6 [K/N] FileCheck-based tests
Introduce a simple infrastructure for testing produced bitcode with
FileCheck LLVM utility.

^KT-48925
2021-10-01 14:18:01 +00:00

15 lines
446 B
Kotlin

/*
* 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.
*/
class A(val x: Int)
// CHECK-LABEL: "kfun:#main(){}"
fun main() {
// CHECK-DEBUG: call %struct.ObjHeader* @AllocInstance
// CHECK-OPT: alloca %"kclassbody:A#internal"
val a = A(5)
println(a.x)
// CHECK-LABEL: epilogue
}