[llvm] [DebugInfo] Fix incorrect debug attribution for inlined allocas (PR #144345)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 17 11:22:13 PDT 2025


================
@@ -2703,6 +2703,17 @@ llvm::InlineResult llvm::InlineFunction(CallBase &CB, InlineFunctionInfo &IFI,
     // Remember the first block that is newly cloned over.
     FirstNewBlock = LastBlock; ++FirstNewBlock;
 
+    // Clear debug locations for all inlined allocas to prevent stack protection
+    // code from inheriting incorrect source attribution
----------------
SLTozer wrote:

Nit, full stop.
```suggestion
    // Clear debug locations for all inlined allocas to prevent stack protection
    // code from inheriting incorrect source attribution.
```

https://github.com/llvm/llvm-project/pull/144345


More information about the llvm-commits mailing list