diff options
author | Fangrui Song <maskray@google.com> | 2018-09-06 20:23:34 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-09-06 20:23:34 +0000 |
commit | e19ee2900280c3d9b99f498026dad3405bcf25c7 (patch) | |
tree | e92885e86327800270228b76b3103c5c7c7d985e /llvm/tools/llvm-dwp/llvm-dwp.cpp | |
parent | 9b11da91c7d7ef953f8cd01e0a65ba51aa7b0467 (diff) | |
download | bcm5719-llvm-e19ee2900280c3d9b99f498026dad3405bcf25c7.tar.gz bcm5719-llvm-e19ee2900280c3d9b99f498026dad3405bcf25c7.zip |
[llvm-dwp] Use cl:: instead of using namespace cl
`using namespace cl` makes llvm::cl::Optional (in Support/CommandLine.h) visible which will cause ambiguity when unqualified `Optional` is looked up (can also refer to llvm::Optional).
cl:: is used much more than `using namespace cl`, so let's not use the latter.
Also append \n to the argument of cl::ParseCommandLineOptions
llvm-svn: 341584
Diffstat (limited to 'llvm/tools/llvm-dwp/llvm-dwp.cpp')
-rw-r--r-- | llvm/tools/llvm-dwp/llvm-dwp.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/llvm/tools/llvm-dwp/llvm-dwp.cpp b/llvm/tools/llvm-dwp/llvm-dwp.cpp index d3380b5b57a..176c470dd02 100644 --- a/llvm/tools/llvm-dwp/llvm-dwp.cpp +++ b/llvm/tools/llvm-dwp/llvm-dwp.cpp @@ -43,21 +43,21 @@ using namespace llvm; using namespace llvm::object; -using namespace cl; -OptionCategory DwpCategory("Specific Options"); -static list<std::string> InputFiles(Positional, ZeroOrMore, - desc("<input files>"), cat(DwpCategory)); +cl::OptionCategory DwpCategory("Specific Options"); +static cl::list<std::string> InputFiles(cl::Positional, cl::ZeroOrMore, + cl::desc("<input files>"), + cl::cat(DwpCategory)); -static list<std::string> ExecFilenames( - "e", ZeroOrMore, - desc("Specify the executable/library files to get the list of *.dwo from"), - value_desc("filename"), cat(DwpCategory)); +static cl::list<std::string> ExecFilenames( + "e", cl::ZeroOrMore, + cl::desc("Specify the executable/library files to get the list of *.dwo from"), + cl::value_desc("filename"), cl::cat(DwpCategory)); -static opt<std::string> OutputFilename(Required, "o", - desc("Specify the output file."), - value_desc("filename"), - cat(DwpCategory)); +static cl::opt<std::string> OutputFilename(cl::Required, "o", + cl::desc("Specify the output file."), + cl::value_desc("filename"), + cl::cat(DwpCategory)); static void writeStringsAndOffsets(MCStreamer &Out, DWPStringPool &Strings, MCSection *StrOffsetSection, @@ -644,7 +644,7 @@ static int error(const Twine &Error, const Twine &Context) { int main(int argc, char **argv) { InitLLVM X(argc, argv); - ParseCommandLineOptions(argc, argv, "merge split dwarf (.dwo) files"); + cl::ParseCommandLineOptions(argc, argv, "merge split dwarf (.dwo) files\n"); llvm::InitializeAllTargetInfos(); llvm::InitializeAllTargetMCs(); |