This is an archive of the discontinued LLVM Phabricator instance.

llvm-lto2: Add a dump-symtab subcommand.
ClosedPublic

Authored by pcc on Apr 10 2017, 6:12 PM.

Details

Summary

This allows us to test the symbol table APIs for LTO input files.

Depends on D31410

Event Timeline

pcc created this revision.Apr 10 2017, 6:12 PM
tejohnson added inline comments.
llvm/tools/llvm-lto2/llvm-lto2.cpp
297

What if not COFF? Should this line be suppressed?

318

Why 'M'? Maybe 'O' for Omitted?

pcc updated this revision to Diff 95005.Apr 12 2017, 11:27 AM
  • Address review comments
llvm/tools/llvm-lto2/llvm-lto2.cpp
297

It will just print the empty string (same for the fallback below). Not a big deal for now, but we can suppress it once we add the target triple to the irsymtab and the LTO API.

318

Yes, I like 'O' better, done.

tejohnson accepted this revision.Apr 12 2017, 11:30 AM

LGTM with one suggestion below.

llvm/tools/llvm-lto2/llvm-lto2.cpp
297

Can you add "(COFF only)" or something to the output string? I think it would be good to distinguish between COFF with no linker opts vs linker opts not available for this format.

This revision is now accepted and ready to land.Apr 12 2017, 11:30 AM
This revision was automatically updated to reflect the committed changes.