2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
2010-03-05 11:25:49 +01:00
|
|
|
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-06-17 00:01:27 +10:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Commercial Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
** a written agreement between you and Nokia.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** If you are unsure which license is appropriate for your use, please
|
2009-08-14 09:30:56 +02:00
|
|
|
** contact the sales department at http://qt.nokia.com/contact.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 12:01:29 +01:00
|
|
|
// Copyright (c) 2008 Roberto Raggi <roberto.raggi@gmail.com>
|
|
|
|
//
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
// THE SOFTWARE.
|
|
|
|
|
|
|
|
#include "Control.h"
|
|
|
|
#include "Literals.h"
|
|
|
|
#include "LiteralTable.h"
|
|
|
|
#include "TranslationUnit.h"
|
|
|
|
#include "CoreTypes.h"
|
|
|
|
#include "Symbols.h"
|
|
|
|
#include "Names.h"
|
2009-11-23 12:42:28 +01:00
|
|
|
#include "TypeMatcher.h"
|
2009-11-30 18:13:08 +01:00
|
|
|
#include <map>
|
|
|
|
#include <set>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-10-20 11:21:25 +02:00
|
|
|
using namespace CPlusPlus;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-11-30 18:13:08 +01:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
template <typename _Tp>
|
|
|
|
struct Compare;
|
|
|
|
|
|
|
|
template <> struct Compare<IntegerType>
|
|
|
|
{
|
|
|
|
bool operator()(const IntegerType &ty, const IntegerType &otherTy) const
|
|
|
|
{ return ty.kind() < otherTy.kind(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<FloatType>
|
|
|
|
{
|
|
|
|
bool operator()(const FloatType &ty, const FloatType &otherTy) const
|
|
|
|
{ return ty.kind() < otherTy.kind(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<PointerToMemberType>
|
|
|
|
{
|
|
|
|
bool operator()(const PointerToMemberType &ty, const PointerToMemberType &otherTy) const
|
|
|
|
{
|
|
|
|
if (ty.memberName() < otherTy.memberName())
|
|
|
|
return true;
|
|
|
|
|
|
|
|
else if (ty.memberName() == otherTy.memberName())
|
|
|
|
return ty.elementType() < otherTy.elementType();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<PointerType>
|
|
|
|
{
|
|
|
|
bool operator()(const PointerType &ty, const PointerType &otherTy) const
|
|
|
|
{
|
|
|
|
return ty.elementType() < otherTy.elementType();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<ReferenceType>
|
|
|
|
{
|
|
|
|
bool operator()(const ReferenceType &ty, const ReferenceType &otherTy) const
|
|
|
|
{
|
|
|
|
return ty.elementType() < otherTy.elementType();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<NamedType>
|
|
|
|
{
|
|
|
|
bool operator()(const NamedType &ty, const NamedType &otherTy) const
|
|
|
|
{
|
|
|
|
return ty.name() < otherTy.name();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<ArrayType>
|
|
|
|
{
|
|
|
|
bool operator()(const ArrayType &ty, const ArrayType &otherTy) const
|
|
|
|
{
|
|
|
|
if (ty.size() < otherTy.size())
|
|
|
|
return true;
|
|
|
|
|
|
|
|
else if (ty.size() == otherTy.size())
|
|
|
|
return ty.elementType() < otherTy.elementType();
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2009-12-01 14:38:42 +01:00
|
|
|
template <> struct Compare<NameId>
|
|
|
|
{
|
|
|
|
bool operator()(const NameId &name, const NameId &otherName) const
|
|
|
|
{
|
|
|
|
return name.identifier() < otherName.identifier();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<DestructorNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const DestructorNameId &name, const DestructorNameId &otherName) const
|
|
|
|
{
|
|
|
|
return name.identifier() < otherName.identifier();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<OperatorNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const OperatorNameId &name, const OperatorNameId &otherName) const
|
|
|
|
{
|
|
|
|
return name.kind() < otherName.kind();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<ConversionNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const ConversionNameId &name, const ConversionNameId &otherName) const
|
|
|
|
{
|
|
|
|
return name.type() < otherName.type();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
template <> struct Compare<TemplateNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const TemplateNameId &name, const TemplateNameId &otherName) const
|
|
|
|
{
|
|
|
|
const Identifier *id = name.identifier();
|
|
|
|
const Identifier *otherId = otherName.identifier();
|
|
|
|
|
|
|
|
if (id == otherId)
|
|
|
|
return std::lexicographical_compare(name.firstTemplateArgument(), name.lastTemplateArgument(),
|
|
|
|
otherName.firstTemplateArgument(), otherName.lastTemplateArgument());
|
|
|
|
|
|
|
|
return id < otherId;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
template <> struct Compare<QualifiedNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const QualifiedNameId &name, const QualifiedNameId &otherName) const
|
|
|
|
{
|
|
|
|
if (name.isGlobal() == otherName.isGlobal())
|
|
|
|
return std::lexicographical_compare(name.firstName(), name.lastName(),
|
|
|
|
otherName.firstName(), otherName.lastName());
|
|
|
|
|
|
|
|
return name.isGlobal() < otherName.isGlobal();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <> struct Compare<SelectorNameId>
|
|
|
|
{
|
|
|
|
bool operator()(const SelectorNameId &name, const SelectorNameId &otherName) const
|
|
|
|
{
|
|
|
|
if (name.hasArguments() == otherName.hasArguments())
|
|
|
|
return std::lexicographical_compare(name.firstName(), name.lastName(),
|
|
|
|
otherName.firstName(), otherName.lastName());
|
|
|
|
|
|
|
|
return name.hasArguments() < otherName.hasArguments();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-11-30 18:13:08 +01:00
|
|
|
template <typename _Tp>
|
|
|
|
class Table: public std::set<_Tp, Compare<_Tp> >
|
|
|
|
{
|
2010-01-14 14:12:40 +01:00
|
|
|
typedef std::set<_Tp, Compare<_Tp> > _Base;
|
2009-11-30 18:13:08 +01:00
|
|
|
public:
|
|
|
|
_Tp *intern(const _Tp &element)
|
2010-01-14 14:12:40 +01:00
|
|
|
{ return const_cast<_Tp *>(&*_Base::insert(element).first); }
|
2009-11-30 18:13:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end of anonymous namespace
|
|
|
|
|
2010-02-09 15:36:00 +10:00
|
|
|
#ifdef Q_OS_SYMBIAN
|
2010-02-03 13:21:08 +10:00
|
|
|
//Symbian compiler has some difficulties to understand the templates.
|
|
|
|
static void delete_array_entries(std::vector<Symbol *> vt)
|
|
|
|
{
|
|
|
|
std::vector<Symbol *>::iterator it;
|
|
|
|
for (it = vt.begin(); it != vt.end(); ++it) {
|
|
|
|
delete *it;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
2009-11-30 17:37:08 +01:00
|
|
|
template <typename _Iterator>
|
|
|
|
static void delete_array_entries(_Iterator first, _Iterator last)
|
|
|
|
{
|
|
|
|
for (; first != last; ++first)
|
|
|
|
delete *first;
|
|
|
|
}
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
template <typename _Array>
|
|
|
|
static void delete_array_entries(const _Array &a)
|
2009-11-30 17:37:08 +01:00
|
|
|
{ delete_array_entries(a.begin(), a.end()); }
|
2010-02-03 13:21:08 +10:00
|
|
|
#endif
|
2009-11-23 12:42:28 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
class Control::Data
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Data(Control *control)
|
|
|
|
: control(control),
|
|
|
|
translationUnit(0),
|
2009-10-07 13:56:59 +02:00
|
|
|
diagnosticClient(0)
|
2009-10-20 13:50:36 +02:00
|
|
|
{}
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
~Data()
|
|
|
|
{
|
|
|
|
// symbols
|
2009-11-23 13:27:57 +01:00
|
|
|
delete_array_entries(symbols);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const NameId *findOrInsertNameId(const Identifier *id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
if (! id)
|
|
|
|
return 0;
|
2009-12-01 14:38:42 +01:00
|
|
|
|
|
|
|
return nameIds.intern(NameId(id));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 14:38:42 +01:00
|
|
|
template <typename _Iterator>
|
|
|
|
const TemplateNameId *findOrInsertTemplateNameId(const Identifier *id, _Iterator first, _Iterator last)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return templateNameIds.intern(TemplateNameId(id, first, last));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const DestructorNameId *findOrInsertDestructorNameId(const Identifier *id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return destructorNameIds.intern(DestructorNameId(id));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const OperatorNameId *findOrInsertOperatorNameId(int kind)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return operatorNameIds.intern(OperatorNameId(kind));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const ConversionNameId *findOrInsertConversionNameId(const FullySpecifiedType &type)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return conversionNameIds.intern(ConversionNameId(type));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 14:38:42 +01:00
|
|
|
template <typename _Iterator>
|
|
|
|
const QualifiedNameId *findOrInsertQualifiedNameId(_Iterator first, _Iterator last, bool isGlobal)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return qualifiedNameIds.intern(QualifiedNameId(first, last, isGlobal));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 14:38:42 +01:00
|
|
|
template <typename _Iterator>
|
|
|
|
const SelectorNameId *findOrInsertSelectorNameId(_Iterator first, _Iterator last, bool hasArguments)
|
2009-07-31 16:03:48 +02:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return selectorNameIds.intern(SelectorNameId(first, last, hasArguments));
|
2009-07-31 16:03:48 +02:00
|
|
|
}
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
IntegerType *findOrInsertIntegerType(int kind)
|
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return integerTypes.intern(IntegerType(kind));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
FloatType *findOrInsertFloatType(int kind)
|
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return floatTypes.intern(FloatType(kind));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
PointerToMemberType *findOrInsertPointerToMemberType(const Name *memberName, const FullySpecifiedType &elementType)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return pointerToMemberTypes.intern(PointerToMemberType(memberName, elementType));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-11-17 14:37:45 +01:00
|
|
|
PointerType *findOrInsertPointerType(const FullySpecifiedType &elementType)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return pointerTypes.intern(PointerType(elementType));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2010-03-23 12:11:33 +01:00
|
|
|
ReferenceType *findOrInsertReferenceType(const FullySpecifiedType &elementType, bool rvalueRef)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2010-03-23 12:11:33 +01:00
|
|
|
return referenceTypes.intern(ReferenceType(elementType, rvalueRef));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-11-23 12:42:28 +01:00
|
|
|
ArrayType *findOrInsertArrayType(const FullySpecifiedType &elementType, unsigned size)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return arrayTypes.intern(ArrayType(elementType, size));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
NamedType *findOrInsertNamedType(const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-30 18:13:08 +01:00
|
|
|
return namedTypes.intern(NamedType(name));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Declaration *newDeclaration(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Declaration *declaration = new Declaration(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(declaration);
|
2008-12-02 12:01:29 +01:00
|
|
|
return declaration;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Argument *newArgument(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Argument *argument = new Argument(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(argument);
|
2008-12-02 12:01:29 +01:00
|
|
|
return argument;
|
|
|
|
}
|
|
|
|
|
2009-12-08 11:58:27 +01:00
|
|
|
TypenameArgument *newTypenameArgument(unsigned sourceLocation, const Name *name)
|
|
|
|
{
|
|
|
|
TypenameArgument *argument = new TypenameArgument(translationUnit,
|
|
|
|
sourceLocation, name);
|
|
|
|
symbols.push_back(argument);
|
|
|
|
return argument;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Function *newFunction(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Function *function = new Function(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(function);
|
2008-12-02 12:01:29 +01:00
|
|
|
return function;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
BaseClass *newBaseClass(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
BaseClass *baseClass = new BaseClass(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(baseClass);
|
2008-12-02 12:01:29 +01:00
|
|
|
return baseClass;
|
|
|
|
}
|
|
|
|
|
|
|
|
Block *newBlock(unsigned sourceLocation)
|
|
|
|
{
|
|
|
|
Block *block = new Block(translationUnit, sourceLocation);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(block);
|
2008-12-02 12:01:29 +01:00
|
|
|
return block;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Class *newClass(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Class *klass = new Class(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(klass);
|
2008-12-02 12:01:29 +01:00
|
|
|
return klass;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Namespace *newNamespace(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Namespace *ns = new Namespace(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(ns);
|
2008-12-02 12:01:29 +01:00
|
|
|
return ns;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
UsingNamespaceDirective *newUsingNamespaceDirective(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
UsingNamespaceDirective *u = new UsingNamespaceDirective(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(u);
|
2008-12-02 12:01:29 +01:00
|
|
|
return u;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ForwardClassDeclaration *newForwardClassDeclaration(unsigned sourceLocation, const Name *name)
|
2009-02-16 15:43:24 +01:00
|
|
|
{
|
|
|
|
ForwardClassDeclaration *c = new ForwardClassDeclaration(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(c);
|
2009-02-16 15:43:24 +01:00
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCBaseClass *newObjCBaseClass(unsigned sourceLocation, const Name *name)
|
2009-10-05 18:02:01 +02:00
|
|
|
{
|
|
|
|
ObjCBaseClass *c = new ObjCBaseClass(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(c);
|
2009-10-05 18:02:01 +02:00
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCBaseProtocol *newObjCBaseProtocol(unsigned sourceLocation, const Name *name)
|
2009-10-05 18:02:01 +02:00
|
|
|
{
|
|
|
|
ObjCBaseProtocol *p = new ObjCBaseProtocol(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(p);
|
2009-10-05 18:02:01 +02:00
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCClass *newObjCClass(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{
|
|
|
|
ObjCClass *c = new ObjCClass(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(c);
|
2009-07-28 16:34:15 +02:00
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCForwardClassDeclaration *newObjCForwardClassDeclaration(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{
|
|
|
|
ObjCForwardClassDeclaration *fwd = new ObjCForwardClassDeclaration(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(fwd);
|
2009-07-28 16:34:15 +02:00
|
|
|
return fwd;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCProtocol *newObjCProtocol(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{
|
|
|
|
ObjCProtocol *p = new ObjCProtocol(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(p);
|
2009-07-28 16:34:15 +02:00
|
|
|
return p;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCForwardProtocolDeclaration *newObjCForwardProtocolDeclaration(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{
|
|
|
|
ObjCForwardProtocolDeclaration *fwd = new ObjCForwardProtocolDeclaration(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(fwd);
|
2009-07-28 16:34:15 +02:00
|
|
|
return fwd;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCMethod *newObjCMethod(unsigned sourceLocation, const Name *name)
|
2009-08-05 18:30:18 +02:00
|
|
|
{
|
|
|
|
ObjCMethod *method = new ObjCMethod(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(method);
|
2009-08-05 18:30:18 +02:00
|
|
|
return method;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCPropertyDeclaration *newObjCPropertyDeclaration(unsigned sourceLocation, const Name *name)
|
2009-11-11 09:32:05 +01:00
|
|
|
{
|
|
|
|
ObjCPropertyDeclaration *decl = new ObjCPropertyDeclaration(translationUnit, sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(decl);
|
2009-11-11 09:32:05 +01:00
|
|
|
return decl;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Enum *newEnum(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
Enum *e = new Enum(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(e);
|
2008-12-02 12:01:29 +01:00
|
|
|
return e;
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
UsingDeclaration *newUsingDeclaration(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
UsingDeclaration *u = new UsingDeclaration(translationUnit,
|
|
|
|
sourceLocation, name);
|
2009-11-23 13:27:57 +01:00
|
|
|
symbols.push_back(u);
|
2008-12-02 12:01:29 +01:00
|
|
|
return u;
|
|
|
|
}
|
|
|
|
|
|
|
|
Control *control;
|
|
|
|
TranslationUnit *translationUnit;
|
|
|
|
DiagnosticClient *diagnosticClient;
|
2009-11-23 12:42:28 +01:00
|
|
|
|
|
|
|
TypeMatcher matcher;
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
LiteralTable<Identifier> identifiers;
|
|
|
|
LiteralTable<StringLiteral> stringLiterals;
|
|
|
|
LiteralTable<NumericLiteral> numericLiterals;
|
|
|
|
|
|
|
|
// ### replace std::map with lookup tables. ASAP!
|
|
|
|
|
|
|
|
// names
|
2009-12-01 14:38:42 +01:00
|
|
|
Table<NameId> nameIds;
|
|
|
|
Table<DestructorNameId> destructorNameIds;
|
|
|
|
Table<OperatorNameId> operatorNameIds;
|
|
|
|
Table<ConversionNameId> conversionNameIds;
|
|
|
|
Table<TemplateNameId> templateNameIds;
|
|
|
|
Table<QualifiedNameId> qualifiedNameIds;
|
|
|
|
Table<SelectorNameId> selectorNameIds;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// types
|
|
|
|
VoidType voidType;
|
2009-11-30 18:13:08 +01:00
|
|
|
Table<IntegerType> integerTypes;
|
|
|
|
Table<FloatType> floatTypes;
|
|
|
|
Table<PointerToMemberType> pointerToMemberTypes;
|
|
|
|
Table<PointerType> pointerTypes;
|
|
|
|
Table<ReferenceType> referenceTypes;
|
|
|
|
Table<ArrayType> arrayTypes;
|
|
|
|
Table<NamedType> namedTypes;
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// symbols
|
2009-11-30 17:37:08 +01:00
|
|
|
std::vector<Symbol *> symbols;
|
2009-10-20 12:47:54 +02:00
|
|
|
|
2010-03-22 10:34:23 +01:00
|
|
|
const Identifier *deprecatedId;
|
2009-10-20 12:47:54 +02:00
|
|
|
// ObjC context keywords:
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *objcGetterId;
|
|
|
|
const Identifier *objcSetterId;
|
|
|
|
const Identifier *objcReadwriteId;
|
|
|
|
const Identifier *objcReadonlyId;
|
|
|
|
const Identifier *objcAssignId;
|
|
|
|
const Identifier *objcRetainId;
|
|
|
|
const Identifier *objcCopyId;
|
|
|
|
const Identifier *objcNonatomicId;
|
2008-12-02 12:01:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
Control::Control()
|
2009-10-20 13:50:36 +02:00
|
|
|
{
|
|
|
|
d = new Data(this);
|
|
|
|
|
2010-03-22 10:34:23 +01:00
|
|
|
d->deprecatedId = findOrInsertIdentifier("deprecated");
|
|
|
|
|
2009-10-20 13:50:36 +02:00
|
|
|
d->objcGetterId = findOrInsertIdentifier("getter");
|
|
|
|
d->objcSetterId = findOrInsertIdentifier("setter");
|
|
|
|
d->objcReadwriteId = findOrInsertIdentifier("readwrite");
|
|
|
|
d->objcReadonlyId = findOrInsertIdentifier("readonly");
|
|
|
|
d->objcAssignId = findOrInsertIdentifier("assign");
|
|
|
|
d->objcRetainId = findOrInsertIdentifier("retain");
|
|
|
|
d->objcCopyId = findOrInsertIdentifier("copy");
|
|
|
|
d->objcNonatomicId = findOrInsertIdentifier("nonatomic");
|
|
|
|
}
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
Control::~Control()
|
|
|
|
{ delete d; }
|
|
|
|
|
|
|
|
TranslationUnit *Control::translationUnit() const
|
|
|
|
{ return d->translationUnit; }
|
|
|
|
|
|
|
|
TranslationUnit *Control::switchTranslationUnit(TranslationUnit *unit)
|
|
|
|
{
|
|
|
|
TranslationUnit *previousTranslationUnit = d->translationUnit;
|
|
|
|
d->translationUnit = unit;
|
|
|
|
return previousTranslationUnit;
|
|
|
|
}
|
|
|
|
|
|
|
|
DiagnosticClient *Control::diagnosticClient() const
|
|
|
|
{ return d->diagnosticClient; }
|
|
|
|
|
|
|
|
void Control::setDiagnosticClient(DiagnosticClient *diagnosticClient)
|
|
|
|
{ d->diagnosticClient = diagnosticClient; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::findIdentifier(const char *chars, unsigned size) const
|
2009-09-07 13:39:46 +02:00
|
|
|
{ return d->identifiers.findLiteral(chars, size); }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::findOrInsertIdentifier(const char *chars, unsigned size)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->identifiers.findOrInsertLiteral(chars, size); }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::findOrInsertIdentifier(const char *chars)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-23 11:56:44 +01:00
|
|
|
unsigned length = std::strlen(chars);
|
2008-12-02 12:01:29 +01:00
|
|
|
return findOrInsertIdentifier(chars, length);
|
|
|
|
}
|
|
|
|
|
2008-12-09 09:42:17 +01:00
|
|
|
Control::IdentifierIterator Control::firstIdentifier() const
|
|
|
|
{ return d->identifiers.begin(); }
|
|
|
|
|
|
|
|
Control::IdentifierIterator Control::lastIdentifier() const
|
|
|
|
{ return d->identifiers.end(); }
|
|
|
|
|
2009-06-05 12:08:36 +02:00
|
|
|
Control::StringLiteralIterator Control::firstStringLiteral() const
|
|
|
|
{ return d->stringLiterals.begin(); }
|
|
|
|
|
|
|
|
Control::StringLiteralIterator Control::lastStringLiteral() const
|
|
|
|
{ return d->stringLiterals.end(); }
|
|
|
|
|
|
|
|
Control::NumericLiteralIterator Control::firstNumericLiteral() const
|
|
|
|
{ return d->numericLiterals.begin(); }
|
|
|
|
|
|
|
|
Control::NumericLiteralIterator Control::lastNumericLiteral() const
|
|
|
|
{ return d->numericLiterals.end(); }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const StringLiteral *Control::findOrInsertStringLiteral(const char *chars, unsigned size)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->stringLiterals.findOrInsertLiteral(chars, size); }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const StringLiteral *Control::findOrInsertStringLiteral(const char *chars)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-23 11:56:44 +01:00
|
|
|
unsigned length = std::strlen(chars);
|
2008-12-02 12:01:29 +01:00
|
|
|
return findOrInsertStringLiteral(chars, length);
|
|
|
|
}
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const NumericLiteral *Control::findOrInsertNumericLiteral(const char *chars, unsigned size)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->numericLiterals.findOrInsertLiteral(chars, size); }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const NumericLiteral *Control::findOrInsertNumericLiteral(const char *chars)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-11-23 11:56:44 +01:00
|
|
|
unsigned length = std::strlen(chars);
|
2008-12-02 12:01:29 +01:00
|
|
|
return findOrInsertNumericLiteral(chars, length);
|
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const NameId *Control::nameId(const Identifier *id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertNameId(id); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const TemplateNameId *Control::templateNameId(const Identifier *id,
|
|
|
|
const FullySpecifiedType *const args,
|
|
|
|
unsigned argv)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return d->findOrInsertTemplateNameId(id, args, args + argv);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const DestructorNameId *Control::destructorNameId(const Identifier *id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertDestructorNameId(id); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const OperatorNameId *Control::operatorNameId(int kind)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertOperatorNameId(kind); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const ConversionNameId *Control::conversionNameId(const FullySpecifiedType &type)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertConversionNameId(type); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const QualifiedNameId *Control::qualifiedNameId(const Name *const *names,
|
|
|
|
unsigned nameCount,
|
|
|
|
bool isGlobal)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return d->findOrInsertQualifiedNameId(names, names + nameCount, isGlobal);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
const SelectorNameId *Control::selectorNameId(const Name *const *names,
|
|
|
|
unsigned nameCount,
|
|
|
|
bool hasArguments)
|
2009-07-31 16:03:48 +02:00
|
|
|
{
|
2009-12-01 14:38:42 +01:00
|
|
|
return d->findOrInsertSelectorNameId(names, names + nameCount, hasArguments);
|
2009-07-31 16:03:48 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
VoidType *Control::voidType()
|
|
|
|
{ return &d->voidType; }
|
|
|
|
|
|
|
|
IntegerType *Control::integerType(int kind)
|
|
|
|
{ return d->findOrInsertIntegerType(kind); }
|
|
|
|
|
|
|
|
FloatType *Control::floatType(int kind)
|
|
|
|
{ return d->findOrInsertFloatType(kind); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
PointerToMemberType *Control::pointerToMemberType(const Name *memberName, const FullySpecifiedType &elementType)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertPointerToMemberType(memberName, elementType); }
|
|
|
|
|
2009-11-17 14:37:45 +01:00
|
|
|
PointerType *Control::pointerType(const FullySpecifiedType &elementType)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertPointerType(elementType); }
|
|
|
|
|
2010-03-23 12:11:33 +01:00
|
|
|
ReferenceType *Control::referenceType(const FullySpecifiedType &elementType, bool rvalueRef)
|
|
|
|
{ return d->findOrInsertReferenceType(elementType, rvalueRef); }
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-11-23 12:42:28 +01:00
|
|
|
ArrayType *Control::arrayType(const FullySpecifiedType &elementType, unsigned size)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertArrayType(elementType, size); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
NamedType *Control::namedType(const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->findOrInsertNamedType(name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Argument *Control::newArgument(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newArgument(sourceLocation, name); }
|
|
|
|
|
2009-12-08 11:58:27 +01:00
|
|
|
TypenameArgument *Control::newTypenameArgument(unsigned sourceLocation, const Name *name)
|
|
|
|
{ return d->newTypenameArgument(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Function *Control::newFunction(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newFunction(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Namespace *Control::newNamespace(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newNamespace(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
BaseClass *Control::newBaseClass(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newBaseClass(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Class *Control::newClass(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newClass(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Enum *Control::newEnum(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newEnum(sourceLocation, name); }
|
|
|
|
|
|
|
|
Block *Control::newBlock(unsigned sourceLocation)
|
|
|
|
{ return d->newBlock(sourceLocation); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
Declaration *Control::newDeclaration(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newDeclaration(sourceLocation, name); }
|
|
|
|
|
|
|
|
UsingNamespaceDirective *Control::newUsingNamespaceDirective(unsigned sourceLocation,
|
2009-12-01 12:46:15 +01:00
|
|
|
const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newUsingNamespaceDirective(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
UsingDeclaration *Control::newUsingDeclaration(unsigned sourceLocation, const Name *name)
|
2008-12-02 12:01:29 +01:00
|
|
|
{ return d->newUsingDeclaration(sourceLocation, name); }
|
|
|
|
|
2009-02-16 15:43:24 +01:00
|
|
|
ForwardClassDeclaration *Control::newForwardClassDeclaration(unsigned sourceLocation,
|
2009-12-01 12:46:15 +01:00
|
|
|
const Name *name)
|
2009-02-16 15:43:24 +01:00
|
|
|
{ return d->newForwardClassDeclaration(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCBaseClass *Control::newObjCBaseClass(unsigned sourceLocation, const Name *name)
|
2009-10-05 18:02:01 +02:00
|
|
|
{ return d->newObjCBaseClass(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCBaseProtocol *Control::newObjCBaseProtocol(unsigned sourceLocation, const Name *name)
|
2009-10-05 18:02:01 +02:00
|
|
|
{ return d->newObjCBaseProtocol(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCClass *Control::newObjCClass(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{ return d->newObjCClass(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCForwardClassDeclaration *Control::newObjCForwardClassDeclaration(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{ return d->newObjCForwardClassDeclaration(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCProtocol *Control::newObjCProtocol(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{ return d->newObjCProtocol(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCForwardProtocolDeclaration *Control::newObjCForwardProtocolDeclaration(unsigned sourceLocation, const Name *name)
|
2009-07-28 16:34:15 +02:00
|
|
|
{ return d->newObjCForwardProtocolDeclaration(sourceLocation, name); }
|
2009-02-16 15:43:24 +01:00
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCMethod *Control::newObjCMethod(unsigned sourceLocation, const Name *name)
|
2009-08-05 18:30:18 +02:00
|
|
|
{ return d->newObjCMethod(sourceLocation, name); }
|
|
|
|
|
2009-12-01 12:46:15 +01:00
|
|
|
ObjCPropertyDeclaration *Control::newObjCPropertyDeclaration(unsigned sourceLocation, const Name *name)
|
2009-11-11 09:32:05 +01:00
|
|
|
{ return d->newObjCPropertyDeclaration(sourceLocation, name); }
|
|
|
|
|
2010-03-22 10:34:23 +01:00
|
|
|
const Identifier *Control::deprecatedId() const
|
|
|
|
{ return d->deprecatedId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcGetterId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcGetterId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcSetterId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcSetterId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcReadwriteId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcReadwriteId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcReadonlyId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcReadonlyId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcAssignId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcAssignId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcRetainId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcRetainId; }
|
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcCopyId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcCopyId; }
|
2009-10-20 11:21:25 +02:00
|
|
|
|
2009-12-01 11:33:13 +01:00
|
|
|
const Identifier *Control::objcNonatomicId() const
|
2009-10-20 12:47:54 +02:00
|
|
|
{ return d->objcNonatomicId; }
|