Index: lib/Transforms/IPO/PruneEH.cpp =================================================================== --- lib/Transforms/IPO/PruneEH.cpp +++ lib/Transforms/IPO/PruneEH.cpp @@ -165,9 +165,10 @@ const AttributeSet &NPAL = AttributeSet::get( F->getContext(), AttributeSet::FunctionIndex, NewAttributes); - if (PAL != NPAL) { + F->addAttributes(AttributeSet::FunctionIndex, NPAL); + + if (PAL != F->getAttributes().getFnAttributes()) { MadeChange = true; - F->addAttributes(AttributeSet::FunctionIndex, NPAL); } }