diff options
author | Chris Bieneman <beanz@apple.com> | 2015-01-22 02:51:33 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-01-22 02:51:33 +0000 |
commit | 42fb49cc52cbfd79a7850b668cfcc91810df3b37 (patch) | |
tree | c0d4a6e4db70c753bbf29356bb6b6da719eb532e /llvm/include/llvm/Support/CommandLine.h | |
parent | 5eb6ade35f614db7662cba826d213f1abd149a9c (diff) | |
download | bcm5719-llvm-42fb49cc52cbfd79a7850b668cfcc91810df3b37.tar.gz bcm5719-llvm-42fb49cc52cbfd79a7850b668cfcc91810df3b37.zip |
Making deleted copy constructors and operators to be private for better diagnostics when deleted is not available.
llvm-svn: 226769
Diffstat (limited to 'llvm/include/llvm/Support/CommandLine.h')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index 1403b7543b5..778ddce3901 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -1169,6 +1169,10 @@ class opt : public Option, Parser.initialize(*this); } + // Command line options should not be copyable + opt(const opt &) LLVM_DELETED_FUNCTION; + opt &operator=(const opt &) LLVM_DELETED_FUNCTION; + public: // setInitialValue - Used by the cl::init modifier... void setInitialValue(const DataType &V) { this->setValue(V, true); } @@ -1180,10 +1184,6 @@ public: return this->getValue(); } - // Command line options should not be copyable - opt(const opt &) LLVM_DELETED_FUNCTION; - opt &operator=(const opt &) LLVM_DELETED_FUNCTION; - // One option... template <class M0t> explicit opt(const M0t &M0) @@ -1368,6 +1368,10 @@ class list : public Option, public list_storage<DataType, Storage> { Parser.initialize(*this); } + // Command line options should not be copyable + list(const list &) LLVM_DELETED_FUNCTION; + list &operator=(const list &) LLVM_DELETED_FUNCTION; + public: ParserClass &getParser() { return Parser; } @@ -1378,10 +1382,6 @@ public: void setNumAdditionalVals(unsigned n) { Option::setNumAdditionalVals(n); } - // Command line options should not be copyable - list(const list &) LLVM_DELETED_FUNCTION; - list &operator=(const list &) LLVM_DELETED_FUNCTION; - // One option... template <class M0t> explicit list(const M0t &M0) @@ -1592,6 +1592,10 @@ class bits : public Option, public bits_storage<DataType, Storage> { Parser.initialize(*this); } + // Command line options should not be copyable + bits(const bits &) LLVM_DELETED_FUNCTION; + bits &operator=(const bits &) LLVM_DELETED_FUNCTION; + public: ParserClass &getParser() { return Parser; } @@ -1600,10 +1604,6 @@ public: return Positions[optnum]; } - // Command line options should not be copyable - bits(const bits &) LLVM_DELETED_FUNCTION; - bits &operator=(const bits &) LLVM_DELETED_FUNCTION; - // One option... template <class M0t> explicit bits(const M0t &M0) @@ -1730,6 +1730,10 @@ class alias : public Option { addArgument(); } + // Command line options should not be copyable + alias(const alias &) LLVM_DELETED_FUNCTION; + alias &operator=(const alias &) LLVM_DELETED_FUNCTION; + public: void setAliasFor(Option &O) { if (AliasFor) @@ -1737,10 +1741,6 @@ public: AliasFor = &O; } - // Command line options should not be copyable - alias(const alias &) LLVM_DELETED_FUNCTION; - alias &operator=(const alias &) LLVM_DELETED_FUNCTION; - // One option... template <class M0t> explicit alias(const M0t &M0) |