================
@@ -484,8 +484,27 @@ void llvm::diagnoseDontCall(const CallInst &CI) {
if (MDNode *MD = CI.getMetadata("srcloc"))
LocCookie =
mdconst::extract<ConstantInt>(MD->getOperand(0))->getZExtValue();
+ MDNode *InlinedFromMD = CI.getMetadata("inlined.from");
DiagnosticInfoDontCall D(F->getName(), A.getValueAsString(), Sev,
- LocCookie);
+ LocCookie, InlinedFromMD);
+
+ if (const DebugLoc &DL = CI.getDebugLoc()) {
+ SmallVector<DebugInlineInfo, 4> DebugChain;
+ auto AddLocation = [&](const DILocation *Loc) {
+ if (auto *Scope = Loc->getScope())
+ if (auto *SP = Scope->getSubprogram())
+ DebugChain.push_back({SP->getName(), Loc->getFilename(),
+ Loc->getLine(), Loc->getColumn()});
+ };
+ if (const DILocation *Loc = DL.get()) {
----------------
JustinStitt wrote:
Makes sense. I wasn't sure if `.get()` could still return null here somehow. I
removed the redundant check with 269a85772dbb43d16b88100da1760e8110d3f111
https://github.com/llvm/llvm-project/pull/174892
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits