summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-08-22 21:16:51 +0000
committerBill Wendling <isanbard@gmail.com>2013-08-22 21:16:51 +0000
commit17d1b6148007077120c07ee229374b6ca0cf1b3e (patch)
tree3a2fdf311ae7da4bd694268d6e62911382576977 /clang/lib
parentfe88aea70675c0fe588307af9b4999c7f7446df6 (diff)
downloadbcm5719-llvm-17d1b6148007077120c07ee229374b6ca0cf1b3e.tar.gz
bcm5719-llvm-17d1b6148007077120c07ee229374b6ca0cf1b3e.zip
Only add this attribute when it's set. If it's not there, the assumption is that it's off.
llvm-svn: 189064
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 32dbfab07d4..971a2ade126 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1058,13 +1058,12 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
// Attributes that should go on the function, but not the call site.
if (!CodeGenOpts.DisableFPElim) {
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
- FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "false");
} else if (CodeGenOpts.OmitLeafFramePointer) {
FuncAttrs.addAttribute("no-frame-pointer-elim", "false");
- FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "true");
+ FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf");
} else {
FuncAttrs.addAttribute("no-frame-pointer-elim", "true");
- FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf", "true");
+ FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf");
}
FuncAttrs.addAttribute("less-precise-fpmad",
@@ -1080,18 +1079,6 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
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",
- llvm::toStringRef(NoFramePointerElimNonLeaf));
-
if (!CodeGenOpts.StackRealignment)
FuncAttrs.addAttribute("no-realign-stack");
}
OpenPOWER on IntegriCloud