This is an archive of the discontinued LLVM Phabricator instance.

Refactor `mlir-translate` to extract the `main()` logic in a helper on the model of `MlirOptMain()` (NFC)
ClosedPublic

Authored by mehdi_amini on Aug 22 2020, 3:11 PM.

Diff Detail

Event Timeline

mehdi_amini created this revision.Aug 22 2020, 3:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 22 2020, 3:11 PM
mehdi_amini requested review of this revision.Aug 22 2020, 3:11 PM
rriddle accepted this revision.Aug 22 2020, 5:14 PM
rriddle added inline comments.
mlir/include/mlir/Translation.h
98

The naming style here looks off.

mlir/lib/Translation/Translation.cpp
19

I'd say this, and likely a few others, could be trimmed.

198–199

Merge the else and the if?

This revision is now accepted and ready to land.Aug 22 2020, 5:14 PM
mehdi_amini marked 3 inline comments as done.

Address comments

This revision was landed with ongoing or failed builds.Aug 22 2020, 6:02 PM
This revision was automatically updated to reflect the committed changes.
bondhugula added inline comments.
mlir/include/mlir/Translation.h
96

ToolName -> toolName in backticks.

96

Can you rephrase to say what it does: "Translates ...", and then what you have here.