This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Delete TypedDINodeRef
ClosedPublic

Authored by MaskRay on May 1 2019, 1:26 AM.

Details

Summary

TypedDINodeRef<T> is a redundant wrapper of Metadata * that is actually a T *.

Accordingly, change DI{Node,Scope,Type}Ref uses to {const,} DI{Node,Scope,Type} *
This allows us to delete many resolve() calls that clutter the code.

Diff Detail

Event Timeline

MaskRay created this revision.May 1 2019, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2019, 1:26 AM
labath resigned from this revision.May 2 2019, 12:41 AM

I don't feel qualified to review this patch.

dexonsmith edited reviewers, added: rnk; removed: dexonsmith.May 6 2019, 9:26 AM
dexonsmith added a subscriber: rnk.

+rnk

include/llvm/IR/DebugInfoMetadata.h
65–69

I can confirm the original motivation (MDString-based ODR-uniquing). @rnk, is it still thought to be useful for CodeView?

rnk accepted this revision.May 6 2019, 10:39 AM

lgtm, thanks!

include/llvm/IR/DebugInfoMetadata.h
65–69

No, we don't need it, we should do this cleanup.

This revision is now accepted and ready to land.May 6 2019, 10:39 AM
This revision was automatically updated to reflect the committed changes.