[llvm] [RemoveDIs][AsmWriter] Process DbgRecord DebugLocs (PR #82482)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 03:22:26 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Orlando Cazalet-Hyams (OCHyams)
<details>
<summary>Changes</summary>
Otherwise DILocations sometimes get printed inline rather than as !dbg attachments in debug prints.
---
Full diff: https://github.com/llvm/llvm-project/pull/82482.diff
1 Files Affected:
- (modified) llvm/lib/IR/AsmWriter.cpp (+1)
``````````diff
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 251485a403fee6..02537c604eb7ad 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1139,6 +1139,7 @@ void SlotTracker::processFunctionMetadata(const Function &F) {
}
void SlotTracker::processDbgRecordMetadata(const DbgRecord &DR) {
+ CreateMetadataSlot(DR.getDebugLoc());
if (const DPValue *DPV = dyn_cast<const DPValue>(&DR)) {
CreateMetadataSlot(DPV->getVariable());
CreateMetadataSlot(DPV->getDebugLoc());
``````````
</details>
https://github.com/llvm/llvm-project/pull/82482
More information about the llvm-commits
mailing list