This is an archive of the discontinued LLVM Phabricator instance.

Allow public Triple deduction from ObjectFiles.
ClosedPublic

Authored by hctim on Sep 11 2017, 3:51 PM.

Details

Summary

Move logic that allows for Triple deduction from an ObjectFile object out of llvm-objdump.cpp into a public factory, found in the ObjectFile class.

This should allow other tools in the future to use this logic without reimplementation.

Event Timeline

hctim created this revision.Sep 11 2017, 3:51 PM
hctim added subscribers: kcc, pcc.Sep 11 2017, 3:53 PM
pcc requested changes to this revision.Sep 11 2017, 6:36 PM

Before considering this patch I would first like to see another client of the function that you are adding.

This revision now requires changes to proceed.Sep 11 2017, 6:36 PM

See D37937 for client.

hctim updated this revision to Diff 115763.Sep 18 2017, 5:31 PM
hctim edited edge metadata.

Made ObjectFile::makeTriple() non-virtual. Removed braces around single line if-statement.

This revision was automatically updated to reflect the committed changes.