diff options
author | Tobias Grosser <tobias@grosser.es> | 2014-02-19 22:16:53 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2014-02-19 22:16:53 +0000 |
commit | 58e0feee1fdc8b6b937cd18ea6af93a1884fa050 (patch) | |
tree | dbe0644452dcdad7ab8c715a6fe31b868b8e49b8 /include | |
parent | 4c18e2e913ba3fc9b7dfc92ebbce7e278f5ae677 (diff) | |
download | llvm-58e0feee1fdc8b6b937cd18ea6af93a1884fa050.tar.gz llvm-58e0feee1fdc8b6b937cd18ea6af93a1884fa050.tar.bz2 llvm-58e0feee1fdc8b6b937cd18ea6af93a1884fa050.tar.xz |
Avoid collisions with Objective-C++ keywords
Change parameter names exposed in headers to avoid collisions with Objective-C++
keywords.
Contributed-by: Graham Lee <graham@iamleeg.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/CommandLine.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 515b0bd00f..4e0b451246 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -1026,8 +1026,8 @@ template<> struct applicator<const char*> { }; template<> struct applicator<NumOccurrencesFlag> { - static void opt(NumOccurrencesFlag NO, Option &O) { - O.setNumOccurrencesFlag(NO); + static void opt(NumOccurrencesFlag N, Option &O) { + O.setNumOccurrencesFlag(N); } }; template<> struct applicator<ValueExpected> { @@ -1061,7 +1061,7 @@ class opt_storage { DataType *Location; // Where to store the object... OptionValue<DataType> Default; - void check() const { + void check_location() const { assert(Location != 0 && "cl::location(...) not specified for a command " "line option with external storage, " "or cl::init specified before cl::location()!!"); @@ -1079,14 +1079,14 @@ public: template<class T> void setValue(const T &V, bool initial = false) { - check(); + check_location(); *Location = V; if (initial) Default = V; } - DataType &getValue() { check(); return *Location; } - const DataType &getValue() const { check(); return *Location; } + DataType &getValue() { check_location(); return *Location; } + const DataType &getValue() const { check_location(); return *Location; } operator DataType() const { return this->getValue(); } |