This is an archive of the discontinued LLVM Phabricator instance.

Create empty shell of llvm-mt.
ClosedPublic

Authored by ecbeckmann on Jul 12 2017, 4:04 PM.

Details

Summary

This is the first patch towards creating the llvm-mt tool for merging
Windows manifests. This is a reimplementation of mt.exe.

Event Timeline

ecbeckmann created this revision.Jul 12 2017, 4:04 PM
rnk accepted this revision.Jul 14 2017, 11:02 AM

lgtm

This revision is now accepted and ready to land.Jul 14 2017, 11:02 AM
ruiu added inline comments.Jul 14 2017, 12:15 PM
llvm/tools/llvm-mt/Opts.td
4

By convention, option names are written in lowercase. So unsupported instead of UNSUPPORTED. Apply all other options in this file.

7

Help text shouldn't end with a full stop.

llvm/tools/llvm-mt/llvm-mt.cpp
49

This open parenthesis is not at the same indentation depth as the closing one.

67

It is convenient to write out "\n" here, instead of embedding "\n" as part of Msg.

72

Please follow the LLVM naming convention.

92

; -> :

118

Remove this blank line.

ecbeckmann marked 7 inline comments as done.

Formatting and naming changes to match convention.

ruiu edited edge metadata.Jul 14 2017, 2:02 PM

Looks like this is still the same as the old version. Can you upload again?

In D35333#810069, @ruiu wrote:

Looks like this is still the same as the old version. Can you upload again?

It's different. Perhaps it looks the same because you are looking at the option IDs which I left capitalized, which is actually the convention. However the actual option text that is matched and displayed in the helptext was moved to lower case. All the other changes you mentioned were also performed.

ruiu added a comment.Jul 14 2017, 2:11 PM

Is all uppercase really a convention? I took a quick look at a few .td files in clang, and looks like they write option ids in lowercase.

ruiu added inline comments.Jul 14 2017, 2:13 PM
llvm/tools/llvm-mt/llvm-mt.cpp
49

Is this done?

67

It's not done.

72

argc and argv still don't follow the LLVM naming convention.

ecbeckmann marked an inline comment as done.Jul 14 2017, 6:11 PM
In D35333#810083, @ruiu wrote:

Is all uppercase really a convention? I took a quick look at a few .td files in clang, and looks like they write option ids in lowercase.

hmm it seems the convention is capital first letter, rest lower case

llvm/tools/llvm-mt/llvm-mt.cpp
49

shoot sorry for some reason git format keeps changing this.

67

hmmm in most recent revision it should be done

72

on most recent revision this should be fine

ecbeckmann marked an inline comment as done.Jul 14 2017, 6:17 PM
In D35333#810083, @ruiu wrote:

Is all uppercase really a convention? I took a quick look at a few .td files in clang, and looks like they write option ids in lowercase.

Or it seems there are differing conventions. I'll do lowercase for now then.

corrected case of options

ruiu added inline comments.Jul 14 2017, 6:46 PM
llvm/tools/llvm-mt/llvm-mt.cpp
48

Align the trailing \.

67

Error messages shouldn't end with a full stop. See https://clang.llvm.org/diagnostics.html for example.

72

Is it? argc and argv should be Argc and Argv.

90

Error messages should start with lowercase letter.

103

Ditto

113

Ditto

ecbeckmann marked 4 inline comments as done.

Changed errors and formatting.

ruiu added inline comments.Jul 17 2017, 12:19 PM
llvm/tools/llvm-mt/llvm-mt.cpp
67

Please fix.

72

Please fix.

90

Shouldn't end with a full stop.

ecbeckmann marked an inline comment as done.

remove error full stops

llvm/tools/llvm-mt/llvm-mt.cpp
72

Hmmm I'm not sure if Argc and Argv are the convention in this case. In all the other "mains" in llvm/tools there is variation between using argc, argc_ and *argv[], argv, *argv_[]. The most common combination is argc and argv.

ecbeckmann marked an inline comment as done.Jul 17 2017, 2:08 PM
ruiu added a comment.Jul 17 2017, 2:20 PM

LGTM

llvm/tools/llvm-mt/llvm-mt.cpp
72

If that is a convention, that is fine, but I hope you mentioned that instead of just marking this as done.

This revision was automatically updated to reflect the committed changes.