summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
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
commitfae228bccb2cbb74131d5dfbf0b021d69cd0c6fd (patch)
tree5df303da392eee50ea26dad4759a7d4b909e3be0 /lib/CodeGen/CGCall.cpp
parent5fdd207ec8f4c1f58bd74f8a84ce1935487563ce (diff)
downloadclang-fae228bccb2cbb74131d5dfbf0b021d69cd0c6fd.tar.gz
clang-fae228bccb2cbb74131d5dfbf0b021d69cd0c6fd.tar.bz2
clang-fae228bccb2cbb74131d5dfbf0b021d69cd0c6fd.tar.xz
Only add this attribute when it's set. If it's not there, the assumption is that it's off.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189064 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp17
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 32dbfab07d..971a2ade12 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/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");
}