This is an archive of the discontinued LLVM Phabricator instance.

[NFC] Add `DebugVariable` constructor that takes `DbgVariableIntrinsic *`
ClosedPublic

Authored by Orlando on Sep 5 2022, 2:46 AM.

Details

Summary

Note: The constructor definition cannot be inline without some refactoring
as it introduces a circular dependency between the headers
llvm/IR/DebugInfoMetadata.h (this file) and llvm/IR/IntrinsicInst.h (where
DbgVariableIntrinsic is defined).


This is used by the assignment tracking patch stack (starts at D132220). I'm happy to wait for those patches to land before landing this, to avoid having unused code hanging around.

Diff Detail

Event Timeline

Orlando created this revision.Sep 5 2022, 2:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 2:46 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
Orlando requested review of this revision.Sep 5 2022, 2:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2022, 2:46 AM
Orlando edited the summary of this revision. (Show Details)Sep 5 2022, 2:47 AM
jryans accepted this revision.Sep 5 2022, 4:30 AM

Seems reasonable to me overall. I would think it's okay to land straight away, but it's also fine to bundle with rest of assignment tracking.

Marked as accepted even with an open question, as I assume you'll do the right thing either way. 😄

llvm/include/llvm/IR/DebugInfoMetadata.h
3634

It seems like it could be const and still access everything you need here...?

This revision is now accepted and ready to land.Sep 5 2022, 4:30 AM
This revision was landed with ongoing or failed builds.Oct 20 2022, 7:29 AM
This revision was automatically updated to reflect the committed changes.
Orlando marked an inline comment as done.

Thanks

llvm/include/llvm/IR/DebugInfoMetadata.h
3634

Good catch. Done.