summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-16 05:23:31 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-16 05:23:31 +0000
commitc6a15cf51948ed0f1f738744c489987c78f6ab1a (patch)
tree1113afa332a9a1499ede9dd0864d07ca56f169a3 /llvm/lib/Transforms/IPO/GlobalOpt.cpp
parenta517c30ed3515ab8afd6cecb279c83f520f98fad (diff)
downloadbcm5719-llvm-c6a15cf51948ed0f1f738744c489987c78f6ab1a.tar.gz
bcm5719-llvm-c6a15cf51948ed0f1f738744c489987c78f6ab1a.zip
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
llvm-svn: 166009
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index 6468ff3276e..678189b3d6c 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2062,15 +2062,13 @@ static void ChangeCalleesToFastCall(Function *F) {
}
static AttrListPtr StripNest(LLVMContext &C, const AttrListPtr &Attrs) {
- AttrBuilder B;
- B.addAttribute(Attributes::Nest);
-
for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) {
if (!Attrs.getSlot(i).Attrs.hasAttribute(Attributes::Nest))
continue;
// There can be only one.
- return Attrs.removeAttr(C, Attrs.getSlot(i).Index, Attributes::get(C, B));
+ return Attrs.removeAttr(C, Attrs.getSlot(i).Index,
+ Attributes::get(C, Attributes::Nest));
}
return Attrs;
OpenPOWER on IntegriCloud