[llvm] r231220 - Avoid copying parser objects
David Blaikie
dblaikie at gmail.com
Tue Mar 3 23:28:59 PST 2015
Author: dblaikie
Date: Wed Mar 4 01:28:59 2015
New Revision: 231220
URL: http://llvm.org/viewvc/llvm-project?rev=231220&view=rev
Log:
Avoid copying parser objects
Use of their copy members is deprecated since they have a user-declared
dtor.
Modified:
llvm/trunk/include/llvm/Support/CommandLine.h
Modified: llvm/trunk/include/llvm/Support/CommandLine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=231220&r1=231219&r2=231220&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Wed Mar 4 01:28:59 2015
@@ -989,7 +989,7 @@ void printOptionDiff(const Option &O, co
// This is instantiated for basic parsers when the parsed value has a different
// type than the option value. e.g. HelpPrinter.
template <class ParserDT, class ValDT> struct OptionDiffPrinter {
- void print(const Option &O, const parser<ParserDT> P, const ValDT & /*V*/,
+ void print(const Option &O, const parser<ParserDT> &P, const ValDT & /*V*/,
const OptionValue<ValDT> & /*Default*/, size_t GlobalWidth) {
P.printOptionNoValue(O, GlobalWidth);
}
@@ -998,7 +998,7 @@ template <class ParserDT, class ValDT> s
// This is instantiated for basic parsers when the parsed value has the same
// type as the option value.
template <class DT> struct OptionDiffPrinter<DT, DT> {
- void print(const Option &O, const parser<DT> P, const DT &V,
+ void print(const Option &O, const parser<DT> &P, const DT &V,
const OptionValue<DT> &Default, size_t GlobalWidth) {
P.printOptionDiff(O, V, Default, GlobalWidth);
}
More information about the llvm-commits
mailing list