We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fc216b commit 07a86a5Copy full SHA for 07a86a5
llvm/lib/CodeGen/TargetOptionsImpl.cpp
@@ -24,9 +24,10 @@ using namespace llvm;
24
bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
25
const Function &F = MF.getFunction();
26
27
- if (!F.hasFnAttribute("frame-pointer"))
+ Attribute FPAttr = F.getFnAttribute("frame-pointer");
28
+ if (!FPAttr.isValid())
29
return false;
- StringRef FP = F.getFnAttribute("frame-pointer").getValueAsString();
30
+ StringRef FP = FPAttr.getValueAsString();
31
if (FP == "all")
32
return true;
33
if (FP == "non-leaf")
0 commit comments