[llvm] [DebugInfo][RemoveDIs] Fix another mismatched debug-info flag (PR #82502)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 08:13:21 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Jeremy Morse (jmorse)
<details>
<summary>Changes</summary>
Here's another scenario where we can create a Function and insert it into a module without carrying over the debug-info flag. See the discourse thread, it's starting to feel like playing whackamole here isn't going to be helpful.
---
Full diff: https://github.com/llvm/llvm-project/pull/82502.diff
1 Files Affected:
- (modified) llvm/lib/IR/Module.cpp (+1)
``````````diff
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index eeb90a6cb3c465..c02794f049ef4e 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -153,6 +153,7 @@ FunctionCallee Module::getOrInsertFunction(StringRef Name, FunctionType *Ty,
if (!New->isIntrinsic()) // Intrinsics get attrs set on construction
New->setAttributes(AttributeList);
FunctionList.push_back(New);
+ New->IsNewDbgInfoFormat = IsNewDbgInfoFormat;
return {Ty, New}; // Return the new prototype.
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/82502
More information about the llvm-commits
mailing list