[PATCH] Part 1 of Many: Refactoring llvm command line parsing
David Majnemer
david.majnemer at gmail.com
Tue Jan 20 22:44:27 PST 2015
================
Comment at: include/llvm/CodeGen/MachinePassRegistry.h:125
@@ -124,3 +124,3 @@
public:
- RegisterPassParser() {}
+ RegisterPassParser(cl::Option* O) : cl::parser<typename RegistryClass::FunctionPassCtor>(O) {}
~RegisterPassParser() { RegistryClass::setListener(nullptr); }
----------------
Pointers should bind to the variable.
================
Comment at: include/llvm/IR/LegacyPassNameParser.h:45-49
@@ -45,8 +44,7 @@
public:
- PassNameParser();
+ PassNameParser(cl::Option* O);
virtual ~PassNameParser();
- void initialize(cl::Option &O) {
- Opt = &O;
- cl::parser<const PassInfo*>::initialize(O);
+ void initialize() {
+ cl::parser<const PassInfo*>::initialize();
----------------
Pointers should be on the right hand side.
================
Comment at: include/llvm/Support/CommandLine.h:532
@@ -533,1 +531,3 @@
public:
+ generic_parser_base(Option *O) : Owner(O){};
+
----------------
Space before the curly brace, isn't the semicolon useless?
http://reviews.llvm.org/D7076
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list