summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-09-11 08:35:09 +0000
committerBill Wendling <isanbard@gmail.com>2013-09-11 08:35:09 +0000
commit62a2d14ac5d93a03e321294f95bb692734b1c62a (patch)
treee3688a7abc91885fc4f07f4abcd6271ffd3a4c77 /llvm/lib
parentd3471e9ea814e6fc635c409d6707bb4a29c7ce89 (diff)
downloadbcm5719-llvm-62a2d14ac5d93a03e321294f95bb692734b1c62a.tar.gz
bcm5719-llvm-62a2d14ac5d93a03e321294f95bb692734b1c62a.zip
Simplify the checking of function attributes by using the simple methods.
llvm-svn: 190499
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 1965188eb0f..24a03bd67dd 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -101,8 +101,7 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) {
placeCSRSpillsAndRestores(Fn);
// Add the code to save and restore the callee saved registers
- if (!F->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
- Attribute::Naked))
+ if (!F->hasFnAttribute(Attribute::Naked))
insertCSRSpillsAndRestores(Fn);
// Allow the target machine to make final modifications to the function
@@ -117,8 +116,7 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) {
// called functions. Because of this, calculateCalleeSavedRegisters()
// must be called before this function in order to set the AdjustsStack
// and MaxCallFrameSize variables.
- if (!F->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
- Attribute::Naked))
+ if (!F->hasFnAttribute(Attribute::Naked))
insertPrologEpilogCode(Fn);
// Replace all MO_FrameIndex operands with physical register references
@@ -221,8 +219,7 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &F) {
return;
// In Naked functions we aren't going to save any registers.
- if (F.getFunction()->getAttributes().hasAttribute(AttributeSet::FunctionIndex,
- Attribute::Naked))
+ if (F.getFunction()->hasFnAttribute(Attribute::Naked))
return;
std::vector<CalleeSavedInfo> CSI;
OpenPOWER on IntegriCloud