diff options
Diffstat (limited to 'lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 166b484440..d7c492383f 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -8026,16 +8026,9 @@ Instruction *InstCombiner::visitCallSite(CallSite CS) { } } - if (isa<InlineAsm>(Callee) && !CS.paramHasAttr(0, ParamAttr::NoUnwind)) { + if (isa<InlineAsm>(Callee) && !CS.doesNotThrow()) { // Inline asm calls cannot throw - mark them 'nounwind'. - const ParamAttrsList *PAL = CS.getParamAttrs(); - uint16_t RAttributes = PAL ? PAL->getParamAttrs(0) : 0; - RAttributes |= ParamAttr::NoUnwind; - - ParamAttrsVector modVec; - modVec.push_back(ParamAttrsWithIndex::get(0, RAttributes)); - PAL = ParamAttrsList::getModified(PAL, modVec); - CS.setParamAttrs(PAL); + CS.setDoesNotThrow(); Changed = true; } |