Make this pass return that it made a change if

it modifies a functions attributes.

llvm-svn: 55831
This commit is contained in:
Duncan Sands 2008-09-05 09:08:37 +00:00
parent 624cab87dc
commit 6dd02b5219
1 changed files with 5 additions and 1 deletions

View File

@ -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) {