From 2b6d8ab975e2b938e72477a6df25b3cce144b72e Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Tue, 23 Mar 2021 17:45:51 +0300 Subject: [PATCH] Native: replace no-frame-pointer-elim* LLVM attributes by frame-pointer LLVM 8 and LLVM 11 understand both, but *frame-pointer-elim* are obscure and obsolete. --- .../org/jetbrains/kotlin/backend/konan/llvm/LlvmAttributes.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmAttributes.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmAttributes.kt index ab8b1b50a2f..eadb28b3bf4 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmAttributes.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmAttributes.kt @@ -67,6 +67,5 @@ private fun shouldEnforceFramePointer(context: Context): Boolean { } private fun enforceFramePointer(llvmFunction: LLVMValueRef) { - LLVMAddTargetDependentFunctionAttr(llvmFunction, "no-frame-pointer-elim", "true") - LLVMAddTargetDependentFunctionAttr(llvmFunction, "no-frame-pointer-elim-non-leaf", "") + LLVMAddTargetDependentFunctionAttr(llvmFunction, "frame-pointer", "all") }