[K/N] Fix filecheck_function_attributes_at_callsite test
This commit is contained in:
@@ -6041,6 +6041,8 @@ fileCheckTest("filecheck_signext_zeroext_objc_export") {
|
||||
|
||||
fileCheckTest("filecheck_function_attributes_at_callsite") {
|
||||
enabled = (project.testTarget != 'wasm32') // KT-49739
|
||||
// attributes for caller and callee might be the same so we allow overlapping.
|
||||
additionalFileCheckFlags = ["--allow-deprecated-dag-overlap"]
|
||||
annotatedSource = project.file('filecheck/function_attributes_at_callsite.kt')
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ fun main() {
|
||||
flameThrower()
|
||||
}
|
||||
|
||||
// CHECK-DAG: attributes #[[THROW_EXCEPTION_DECLARATION_ATTRIBUTES]] = { noreturn uwtable {{.+}} }
|
||||
// CHECK-DAG: attributes #[[THROW_EXCEPTION_CALLSITE_ATTRIBUTES]] = { noreturn uwtable }
|
||||
// CHECK-DAG: attributes #[[FLAME_THROWER_DECLARATION_ATTRIBUTES]] = { noreturn {{.+}} }
|
||||
// CHECK-DAG: attributes #[[FLAME_THROWER_CALLSITE_ATTRIBUTES]] = { noreturn }
|
||||
// CHECK-DAG: attributes #[[THROW_EXCEPTION_DECLARATION_ATTRIBUTES]] = {{{.*}}noreturn{{.*}}}
|
||||
// CHECK-DAG: attributes #[[THROW_EXCEPTION_CALLSITE_ATTRIBUTES]] = {{{.*}}noreturn{{.*}}}
|
||||
// CHECK-DAG: attributes #[[FLAME_THROWER_DECLARATION_ATTRIBUTES]] = {{{.*}}noreturn{{.*}}}
|
||||
// CHECK-DAG: attributes #[[FLAME_THROWER_CALLSITE_ATTRIBUTES]] = {{{.*}}noreturn{{.*}}}
|
||||
@@ -89,10 +89,16 @@ open class FileCheckTest : DefaultTask() {
|
||||
* Check that [inputFile] matches [annotatedFile] with FileCheck.
|
||||
*/
|
||||
private fun runFileCheck(annotatedFile: Path, inputFile: Path): ProcessOutput {
|
||||
val args = mutableListOf(annotatedFile.toAbsolutePath().toString(), "--input-file", inputFile.toAbsolutePath().toString())
|
||||
val args = mutableListOf(
|
||||
annotatedFile.toAbsolutePath().toString(),
|
||||
"--input-file", inputFile.toAbsolutePath().toString()
|
||||
)
|
||||
checkPrefix?.let {
|
||||
args.addAll(listOf("--check-prefix", it))
|
||||
}
|
||||
additionalFileCheckFlags?.let {
|
||||
args.addAll(it)
|
||||
}
|
||||
val platform = project.platformManager.platform(target)
|
||||
val configurables = platform.configurables
|
||||
val llvmBin = "${configurables.absoluteLlvmHome}/bin"
|
||||
|
||||
Reference in New Issue
Block a user