Use the CALLSITE_DELEGATE_SETTER macro in CallSiteBase::setCannotDuplicate.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
FWIW, probably a single CALLSITE_DELEGATE macro could be used all over:
#define CALLSITE_DELEGATE(METHOD) \ InstrTy *II = getInstruction(); \ return isCall() \ ? cast<CallInst>(II)->METHOD \ : cast<InvokeInst>(II)->METHOD