nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.
thanks for the patch!
================
Comment at: llvm/lib/IR/DiagnosticInfo.cpp:408-427
+ if (F->hasFnAttribute("dontcall-error")) {
+ unsigned LocCookie = 0;
+ auto A = F->getFnAttribute("dontcall-error");
+ if (MDNode *MD = CI.getMetadata("srcloc"))
+ LocCookie =
+ mdconst::extract<ConstantInt>(MD->getOperand(0))->getZExtValue();
+ DiagnosticInfoDontCall D(F->getName(), A.getValueAsString(), DS_Error,
----------------
Any way to DRY up this code?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110364/new/
https://reviews.llvm.org/D110364
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits