diff --git a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp index c741fe2b3778..ff1e8050c7e7 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp @@ -183,13 +183,13 @@ LLVMBool LLVMCreateMCJITCompilerForModule( std::unique_ptr Mod(unwrap(M)); if (Mod) - // Set function attribute "no-frame-pointer-elim" based on + // Set function attribute "frame-pointer" based on // NoFramePointerElim. for (auto &F : *Mod) { auto Attrs = F.getAttributes(); - StringRef Value(options.NoFramePointerElim ? "true" : "false"); + StringRef Value = options.NoFramePointerElim ? "all" : "none"; Attrs = Attrs.addAttribute(F.getContext(), AttributeList::FunctionIndex, - "no-frame-pointer-elim", Value); + "frame-pointer", Value); F.setAttributes(Attrs); }