mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
Check only if we have this attribute. If it's not an attribute, then it's assumed false.
llvm-svn: 189063
This commit is contained in:
parent
4910234c0f
commit
8e2cebfc81
@ -22,10 +22,8 @@ using namespace llvm;
|
||||
bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
|
||||
// Check to see if we should eliminate non-leaf frame pointers and then
|
||||
// check to see if we should eliminate all frame pointers.
|
||||
bool NoFramePointerElimNonLeaf =
|
||||
MF.getFunction()->getFnAttribute("no-frame-pointer-elim-non-leaf")
|
||||
.getValueAsString() == "true";
|
||||
if (NoFramePointerElimNonLeaf && !NoFramePointerElim) {
|
||||
if (MF.getFunction()->hasFnAttribute("no-frame-pointer-elim-non-leaf") &&
|
||||
!NoFramePointerElim) {
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
return MFI->hasCalls();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user