This is an archive of the discontinued LLVM Phabricator instance.

[codeview] Isolate type dumping from object file state
ClosedPublic

Authored by rnk on May 2 2016, 12:58 PM.

Details

Summary

This isolates the state we use for type dumping from the knowledge of object
files. We can use CVTypeDumper to dump types from anywhere in memory now.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 55871.May 2 2016, 12:58 PM
rnk updated this revision to Diff 55873.
rnk retitled this revision from to [codeview] Isolate type dumping from object file state.
rnk updated this object.
rnk added reviewers: amccarth, zturner.
rnk added a subscriber: llvm-commits.

style

zturner accepted this revision.May 2 2016, 1:12 PM
zturner edited edge metadata.

I wonder if llvm-pdbdump will want to use this eventually. Although I don't have a good idea where to put it in common code so that it can be reused.

This revision is now accepted and ready to land.May 2 2016, 1:12 PM
rnk added a comment.May 2 2016, 1:20 PM

I wonder if llvm-pdbdump will want to use this eventually. Although I don't have a good idea where to put it in common code so that it can be reused.

Agreed. I think maybe it's best for llvm-pdbdump to keep testing the interface you have that abstracts over DIA.

My goal for this is to be able to dump a merged type stream without creating an object file or PDB. That should let us write more targeted tests.

In D19824#419096, @rnk wrote:

I wonder if llvm-pdbdump will want to use this eventually. Although I don't have a good idea where to put it in common code so that it can be reused.

Agreed. I think maybe it's best for llvm-pdbdump to keep testing the interface you have that abstracts over DIA.

It should certainly continue to test that, but I think it should also dump the raw properties of a file, such as the stuff I've been working on the past week. Low level file structure type stuff.

This revision was automatically updated to reflect the committed changes.
amccarth added inline comments.May 2 2016, 1:46 PM
tools/llvm-readobj/COFFDumper.cpp
57 ↗(On Diff #55873)

explicit?

70 ↗(On Diff #55873)

user-defined (hyphen)