This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Add bitcode reader/writer for DILabel metadata.
AbandonedPublic

Authored by HsiangKai on Mar 29 2018, 6:58 AM.

Details

Reviewers
rnk
chenwj
Summary

Create new MetadataCodes METADATA_LABEL. Bitcode reader will use GET_OR_DISTINCT()
to create DILabel objects and store the objects into LLVMContext.

In addition, implement bitcode writer in ModuleBitcodeWriter.

Diff Detail

Repository
rL LLVM

Event Timeline

HsiangKai created this revision.Mar 29 2018, 6:58 AM
chenwj added a comment.EditedMar 30 2018, 8:00 AM

I am not sure which fields of DILabel are required or optional, please double check yourself. I also feel bitcode patch can be combined with llvm assembly patch.

lib/Bitcode/Reader/MetadataLoader.cpp
1652

According D45025, should be Record.size() != 5?

It's usual to do bitcode and text reading/writing for new metadata all in one patch; splitting it up actually makes it harder to review.

HsiangKai abandoned this revision.Apr 2 2018, 8:03 AM

It's usual to do bitcode and text reading/writing for new metadata all in one patch; splitting it up actually makes it harder to review.

Merged into D45024. This patch should be abandoned.