This is an archive of the discontinued LLVM Phabricator instance.

Introducing LLVMMetadataRef
ClosedPublic

Authored by deadalnix on Apr 22 2016, 5:34 PM.

Details

Summary

This seems like an uncontroversial first step toward providing access to the metadata hierarchy that now exists in LLVM. This should allow for good debug info support from C.

Future plans are to deprecate API that take mixed bags of values and metadata (mainly the LLVMMDNode family of functions) and migrate the rest toward the use of LLVMMetadataRef.

Once this is in place, mapping of DIBuilder will be able to start.

Diff Detail

Repository
rL LLVM

Event Timeline

deadalnix updated this revision to Diff 54754.Apr 22 2016, 5:34 PM
deadalnix retitled this revision from to Introducing LLVMMetadataRef.
deadalnix updated this object.
deadalnix added a subscriber: llvm-commits.
Wallbraker edited edge metadata.Apr 25 2016, 2:50 PM

So they are completely redoing[1] the debug info interface which this is a precursor for, so I dunno how much benefit this will give us right now.

I do like this commit otherwise, some small nitpicks.

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-March/097773.html

include/llvm/IR/Value.h
793 ↗(On Diff #54754)

Unrelated NFC.

lib/IR/Core.cpp
770 ↗(On Diff #54754)

Unrelated NFC.

818 ↗(On Diff #54754)

Shouldn't we do a similar smart unwrap that we do with ValueAsMetadata, turning constants into real constants?

deadalnix added inline comments.Apr 25 2016, 3:30 PM
lib/IR/Core.cpp
818 ↗(On Diff #54754)

This is unwrapping constants internally already.

deadalnix updated this revision to Diff 54933.Apr 25 2016, 3:44 PM
deadalnix edited edge metadata.

Remove NFC changes.

Wallbraker accepted this revision.Apr 25 2016, 4:06 PM
Wallbraker edited edge metadata.

Looks good to me!

This revision is now accepted and ready to land.Apr 25 2016, 4:06 PM

Looks like patch was not committed.

No because what comes next was unclear. The good new is that I'll have more time to work on that soon, so you should see progress again.

This revision was automatically updated to reflect the committed changes.