// Set frame pointer elimination mode.
if (!CodeGenOpts.DisableFPElim) {
Options.NoFramePointerElim = false;
- Options.NoFramePointerElimNonLeaf = false;
} else if (CodeGenOpts.OmitLeafFramePointer) {
Options.NoFramePointerElim = false;
- Options.NoFramePointerElimNonLeaf = true;
} else {
Options.NoFramePointerElim = true;
- Options.NoFramePointerElimNonLeaf = true;
}
if (CodeGenOpts.UseInitArray)
CodeGenOpts.SoftFloat ? "true" : "false");
FuncAttrs.addAttribute("stack-protector-buffer-size",
llvm::utostr(CodeGenOpts.SSPBufferSize));
+
+ bool NoFramePointerElimNonLeaf;
+ if (!CodeGenOpts.DisableFPElim) {
+ NoFramePointerElimNonLeaf = false;
+ } else if (CodeGenOpts.OmitLeafFramePointer) {
+ NoFramePointerElimNonLeaf = true;
+ } else {
+ NoFramePointerElimNonLeaf = true;
+ }
+
+ FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
+ NoFramePointerElimNonLeaf ? "true" : "false");
}
QualType RetTy = FI.getReturnType();