summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index 5e50e20af4..8fb904b1ea 100644
--- a/lib/Transforms/IPO/PruneEH.cpp
+++ b/lib/Transforms/IPO/PruneEH.cpp
@@ -133,7 +133,11 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
NewAttributes |= ParamAttr::NoReturn;
const PAListPtr &PAL = SCC[i]->getFunction()->getParamAttrs();
- SCC[i]->getFunction()->setParamAttrs(PAL.addAttr(0, NewAttributes));
+ const PAListPtr &NPAL = PAL.addAttr(0, NewAttributes);
+ if (PAL != NPAL) {
+ MadeChange = true;
+ SCC[i]->getFunction()->setParamAttrs(NPAL);
+ }
}
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {