[llvm] r201727 - Avoid collisions with Objective-C++ keywords
Tobias Grosser
tobias at grosser.es
Wed Feb 19 14:16:53 PST 2014
Author: grosser
Date: Wed Feb 19 16:16:53 2014
New Revision: 201727
URL: http://llvm.org/viewvc/llvm-project?rev=201727&view=rev
Log:
Avoid collisions with Objective-C++ keywords
Change parameter names exposed in headers to avoid collisions with Objective-C++
keywords.
Contributed-by: Graham Lee <graham at iamleeg.com>
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=201727&r1=201726&r2=201727&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CommandLine.h (original)
+++ llvm/trunk/include/llvm/Support/CommandLine.h Wed Feb 19 16:16:53 2014
@@ -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(); }
More information about the llvm-commits
mailing list