summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mt/llvm-mt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [opt] Change the parameter of OptTable::PrintHelp from Name to Usage and ↵Fangrui Song2018-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | don't append "[options] <inputs>" Summary: Before, "[options] <inputs>" is unconditionally appended to the `Name` parameter. It is more flexible to change its semantic to `Usage` and let user customize the usage line. % llvm-objcopy ... USAGE: llvm-objcopy <input> [ <output> ] [options] <inputs> With this patch: % llvm-objcopy ... USAGE: llvm-objcopy input [output] Reviewers: rupprecht, alexshap, jhenderson Reviewed By: rupprecht Subscribers: jakehehrlich, mehdi_amini, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D51009 llvm-svn: 344097
* [llvm-mt] Use WithColor for printing errors.Jonas Devlieghere2018-06-231-1/+2
| | | | | | Use the WithColor helper from support to print errors. llvm-svn: 335416
* Define InitLLVM to do common initialization all at once.Rui Ueyama2018-04-131-14/+4
| | | | | | | | | | | We have a few functions that virtually all command wants to run on process startup/shutdown. This patch adds InitLLVM class to do that all at once, so that we don't need to copy-n-paste boilerplate code to each llvm command's main() function. Differential Revision: https://reviews.llvm.org/D45602 llvm-svn: 330046
* [Option] Add 'findNearest' method to catch typosBrian Gesiak2018-01-051-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a method `OptTable::findNearest`, which allows users of OptTable to check user input for misspelled options. In addition, have llvm-mt check for misspelled options. For example, if a user invokes `llvm-mt /oyt:foo`, the error message will indicate that while an option named `/oyt:` does not exist, `/out:` does. The method ports the functionality of the `LookupNearestOption` method from LLVM CommandLine to libLLVMOption. This allows tools like Clang and Swift, which do not use CommandLine, to use this functionality to suggest similarly spelled options. As room for future improvement, the new method as-is cannot yet properly suggest nearby "joined" options -- that is, for an option string "-FozBar", where "-Foo" is the correct option name and "Bar" is the value being passed along with the misspelled option, this method will calculate an edit distance of 4, by deleting "Bar" and changing "z" to "o". It should instead calculate an edit distance of just 1, by changing "z" to "o" and recognizing "Bar" as a value. This commit includes a disabled test that expresses this limitation. Test Plan: `check-llvm` Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, jroelofs Reviewed By: jroelofs Subscribers: jroelofs, llvm-commits Differential Revision: https://reviews.llvm.org/D41732 llvm-svn: 321877
* Don't #include MemoryBuffer.h from Host.h.Zachary Turner2017-11-171-0/+1
| | | | | | | | | | It turns out this #include isn't used from Host.h anyway, but by having it it causes circular include dependencies. This issues only surfaced while I was working on a separate patch, so I'm submitting this first so that it's independent of the other, unrelated patch. llvm-svn: 318489
* Convert FileOutputBuffer to Expected. NFC.Rafael Espindola2017-11-081-2/+2
| | | | llvm-svn: 317649
* llvm-mt: Merge manifest namespaces.Eric Beckmann2017-08-191-1/+4
| | | | | | | | | | | mt.exe performs a tree merge where certain element nodes are combined into one. This introduces the possibility of xml namespaces conflicting with each other. The original mt.exe has a hierarchy whereby certain namespace names can override others, and nodes that would then end up in ambigious namespaces have their namespaces explicitly defined. This namespace handles this merging process. llvm-svn: 311215
* Move manifest utils into separate lib, to reduce libxml2 deps.Eric Beckmann2017-07-261-1/+1
| | | | | | | | | | | | | | | | Summary: Previously were in support. Since many many things depend on support, were all forced to also depend on libxml2, which we only want in a few cases. This puts all the libxml2 deps in a separate lib to be used only in a few places. Reviewers: ruiu, thakis, rnk Subscribers: mgorny, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35819 llvm-svn: 309070
* Reapply "llvm-mt: implement simple merging of manifests, not factoring ↵Eric Beckmann2017-07-261-1/+0
| | | | | | | | | | namespaces. This time with correct #if. This reverts commit 9cf4eca0e0383040c1ff1416815c7f649650c2a0. llvm-svn: 309064
* Revert "llvm-mt: implement simple merging of manifests, not factoring ↵Eric Beckmann2017-07-251-0/+1
| | | | | | | | namespaces." This reverts commit 813308e240792ca70ed2f998f21df24a5061ada0. llvm-svn: 309050
* llvm-mt: implement simple merging of manifests, not factoring namespaces.Eric Beckmann2017-07-251-1/+0
| | | | | | | | | | | | Summary: Does a simple merge, where mergeable elements are combined, all others are appended. Does not apply trickly namespace rules. Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35753 llvm-svn: 309047
* Implement parsing and writing of a single xml manifest file.Eric Beckmann2017-07-201-1/+40
| | | | | | | | | | Summary: Implement parsing and writing of a single xml manifest file. Subscribers: mgorny, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35425 llvm-svn: 308679
* Revert "Adding temporary debugging info to llvm-mt to solve fedora failure."Eric Beckmann2017-07-181-8/+1
| | | | | | This reverts commit 223ef99f839f6b056272bcf4390841fcb26dda3c. llvm-svn: 308263
* Revert "Adding yet more debug info to fix fedora issue."Eric Beckmann2017-07-181-6/+0
| | | | | | This reverts commit f3aaaac609f801df6c12655ec203455be7094627. llvm-svn: 308262
* Revert "Adding extra test info for llvm-mt."Eric Beckmann2017-07-181-2/+14
| | | | | | This reverts commit 66093fd60b848572f676023b8387bff69b151511. llvm-svn: 308261
* Adding extra test info for llvm-mt.Eric Beckmann2017-07-181-14/+2
| | | | llvm-svn: 308252
* Adding yet more debug info to fix fedora issue.Eric Beckmann2017-07-171-0/+6
| | | | llvm-svn: 308232
* Adding temporary debugging info to llvm-mt to solve fedora failure.Eric Beckmann2017-07-171-1/+8
| | | | llvm-svn: 308227
* Create empty shell of llvm-mt.Eric Beckmann2017-07-171-0/+117
Summary: This is the first patch towards creating the llvm-mt tool for merging Windows manifests. This is a reimplementation of mt.exe. Reviewers: zturner, ruiu, rnk Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D35333 llvm-svn: 308224
OpenPOWER on IntegriCloud