Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RemoveDIs][AsmWriter] Process DbgRecord DebugLocs #82482

Closed
wants to merge 1 commit into from

Conversation

OCHyams
Copy link
Contributor

@OCHyams OCHyams commented Feb 21, 2024

Otherwise DILocations sometimes get printed inline rather than as !dbg attachments in debug prints.

Otherwise DILocations sometimes get printed inline rather than as !dbg
attachments in debug prints.
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 21, 2024

@llvm/pr-subscribers-llvm-ir

Author: Orlando Cazalet-Hyams (OCHyams)

Changes

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 --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());

@OCHyams
Copy link
Contributor Author

OCHyams commented Feb 21, 2024

I misread that DebugLocs were already tracked here - this came up while looking at llvm.dbg.labels - the problem doesn't exist in main yet and is of my making. Ignore this!

@OCHyams OCHyams closed this Feb 21, 2024
@OCHyams OCHyams deleted the ddd/asmwriter-metadata branch February 21, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants