bool operator>(const UnresolvedSetIterator &o) const { return ir > o.ir; }
};
-/// UnresolvedSet - A set of unresolved declarations.
+/// \brief A set of unresolved declarations.
class UnresolvedSetImpl {
typedef SmallVectorImpl<DeclAccessPair> DeclsTy;
}
};
-/// A set of unresolved declarations
+/// \brief A set of unresolved declarations.
template <unsigned InlineCapacity> class UnresolvedSet :
public UnresolvedSetImpl {
SmallVector<DeclAccessPair, InlineCapacity> Decls;
: VTableIndex(VTableIndex), VTableBase(VTableBase) {}
};
-/// VTT builder - Class for building VTT layout information.
+/// \brief Class for building VTT layout information.
class VTTBuilder {
ASTContext &Ctx;
- /// MostDerivedClass - The most derived class for which we're building this
- /// vtable.
+ /// \brief The most derived class for which we're building this vtable.
const CXXRecordDecl *MostDerivedClass;
typedef SmallVector<VTTVTable, 64> VTTVTablesVectorTy;
- /// VTTVTables - The VTT vtables.
+ /// \brief The VTT vtables.
VTTVTablesVectorTy VTTVTables;
typedef SmallVector<VTTComponent, 64> VTTComponentsVectorTy;
- /// VTTComponents - The VTT components.
+ /// \brief The VTT components.
VTTComponentsVectorTy VTTComponents;
- /// MostDerivedClassLayout - the AST record layout of the most derived class.
+ /// \brief The AST record layout of the most derived class.
const ASTRecordLayout &MostDerivedClassLayout;
typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> VisitedVirtualBasesSetTy;
typedef llvm::DenseMap<BaseSubobject, uint64_t> AddressPointsMapTy;
- /// SubVTTIndicies - The sub-VTT indices for the bases of the most derived
- /// class.
+ /// \brief The sub-VTT indices for the bases of the most derived class.
llvm::DenseMap<BaseSubobject, uint64_t> SubVTTIndicies;
- /// SecondaryVirtualPointerIndices - The secondary virtual pointer indices of
- /// all subobjects of the most derived class.
+ /// \brief The secondary virtual pointer indices of all subobjects of
+ /// the most derived class.
llvm::DenseMap<BaseSubobject, uint64_t> SecondaryVirtualPointerIndices;
- /// GenerateDefinition - Whether the VTT builder should generate LLVM IR for
- /// the VTT.
+ /// \brief Whether the VTT builder should generate LLVM IR for the VTT.
bool GenerateDefinition;
- /// AddVTablePointer - Add a vtable pointer to the VTT currently being built.
+ /// \brief Add a vtable pointer to the VTT currently being built.
void AddVTablePointer(BaseSubobject Base, uint64_t VTableIndex,
const CXXRecordDecl *VTableClass);
- /// LayoutSecondaryVTTs - Lay out the secondary VTTs of the given base
- /// subobject.
+ /// \brief Lay out the secondary VTTs of the given base subobject.
void LayoutSecondaryVTTs(BaseSubobject Base);
- /// LayoutSecondaryVirtualPointers - Lay out the secondary virtual pointers
- /// for the given base subobject.
+ /// \brief Lay out the secondary virtual pointers for the given base
+ /// subobject.
///
/// \param BaseIsMorallyVirtual whether the base subobject is a virtual base
/// or a direct or indirect base of a virtual base.
const CXXRecordDecl *VTableClass,
VisitedVirtualBasesSetTy &VBases);
- /// LayoutSecondaryVirtualPointers - Lay out the secondary virtual pointers
- /// for the given base subobject.
+ /// \brief Lay out the secondary virtual pointers for the given base
+ /// subobject.
void LayoutSecondaryVirtualPointers(BaseSubobject Base,
uint64_t VTableIndex);
- /// LayoutVirtualVTTs - Lay out the VTTs for the virtual base classes of the
- /// given record decl.
+ /// \brief Lay out the VTTs for the virtual base classes of the given
+ /// record declaration.
void LayoutVirtualVTTs(const CXXRecordDecl *RD,
VisitedVirtualBasesSetTy &VBases);
- /// LayoutVTT - Will lay out the VTT for the given subobject, including any
+ /// \brief Lay out the VTT for the given subobject, including any
/// secondary VTTs, secondary virtual pointers and virtual VTTs.
void LayoutVTT(BaseSubobject Base, bool BaseIsVirtual);
VTTBuilder(ASTContext &Ctx, const CXXRecordDecl *MostDerivedClass,
bool GenerateDefinition);
- // getVTTComponents - Returns a reference to the VTT components.
+ // \brief Returns a reference to the VTT components.
const VTTComponentsVectorTy &getVTTComponents() const {
return VTTComponents;
}
- // getVTTVTables - Returns a reference to the VTT vtables.
+ // \brief Returns a reference to the VTT vtables.
const VTTVTablesVectorTy &getVTTVTables() const {
return VTTVTables;
}
- /// getSubVTTIndicies - Returns a reference to the sub-VTT indices.
+ /// \brief Returns a reference to the sub-VTT indices.
const llvm::DenseMap<BaseSubobject, uint64_t> &getSubVTTIndicies() const {
return SubVTTIndicies;
}
- /// getSecondaryVirtualPointerIndices - Returns a reference to the secondary
- /// virtual pointer indices.
+ /// \brief Returns a reference to the secondary virtual pointer indices.
const llvm::DenseMap<BaseSubobject, uint64_t> &
getSecondaryVirtualPointerIndices() const {
return SecondaryVirtualPointerIndices;
namespace clang {
class CXXRecordDecl;
-/// VTableComponent - Represents a single component in a vtable.
+/// \brief Represents a single component in a vtable.
class VTableComponent {
public:
enum Kind {
CK_RTTI,
CK_FunctionPointer,
- /// CK_CompleteDtorPointer - A pointer to the complete destructor.
+ /// \brief A pointer to the complete destructor.
CK_CompleteDtorPointer,
- /// CK_DeletingDtorPointer - A pointer to the deleting destructor.
+ /// \brief A pointer to the deleting destructor.
CK_DeletingDtorPointer,
- /// CK_UnusedFunctionPointer - In some cases, a vtable function pointer
- /// will end up never being called. Such vtable function pointers are
- /// represented as a CK_UnusedFunctionPointer.
+ /// \brief An entry that is never used.
+ ///
+ /// In some cases, a vtable function pointer will end up never being
+ /// called. Such vtable function pointers are represented as a
+ /// CK_UnusedFunctionPointer.
CK_UnusedFunctionPointer
};
return VTableComponent(I);
}
- /// getKind - Get the kind of this vtable component.
+ /// \brief Get the kind of this vtable component.
Kind getKind() const {
return (Kind)(Value & 0x7);
}
/// The kind is stored in the lower 3 bits of the value. For offsets, we
/// make use of the facts that classes can't be larger than 2^55 bytes,
- /// so we store the offset in the lower part of the 61 bytes that remain.
+ /// so we store the offset in the lower part of the 61 bits that remain.
/// (The reason that we're not simply using a PointerIntPair here is that we
/// need the offsets to be 64-bit, even when on a 32-bit machine).
int64_t Value;
uint64_t NumVTableComponents;
llvm::OwningArrayPtr<VTableComponent> VTableComponents;
- /// VTableThunks - Contains thunks needed by vtables.
+ /// \brief Contains thunks needed by vtables.
uint64_t NumVTableThunks;
llvm::OwningArrayPtr<VTableThunkTy> VTableThunks;
- /// Address points - Address points for all vtables.
+ /// \brief Address points for all vtables.
AddressPointsMapTy AddressPoints;
bool IsMicrosoftABI;
private:
bool IsMicrosoftABI;
- /// MethodVTableIndices - Contains the index (relative to the vtable address
- /// point) where the function pointer for a virtual function is stored.
+ /// \brief Contains the index (relative to the vtable address point)
+ /// where the function pointer for a virtual function is stored.
typedef llvm::DenseMap<GlobalDecl, int64_t> MethodVTableIndicesTy;
MethodVTableIndicesTy MethodVTableIndices;
typedef std::pair<const CXXRecordDecl *,
const CXXRecordDecl *> ClassPairTy;
- /// VirtualBaseClassOffsetOffsets - Contains the vtable offset (relative to
- /// the address point) in chars where the offsets for virtual bases of a class
- /// are stored.
+ /// \brief vtable offsets for offsets of virtual bases of a class.
+ ///
+ /// Contains the vtable offset (relative to the address point) in chars
+ /// where the offsets for virtual bases of a class are stored.
typedef llvm::DenseMap<ClassPairTy, CharUnits>
VirtualBaseClassOffsetOffsetsMapTy;
VirtualBaseClassOffsetOffsetsMapTy VirtualBaseClassOffsetOffsets;
typedef llvm::DenseMap<const CXXMethodDecl *, ThunkInfoVectorTy> ThunksMapTy;
- /// Thunks - Contains all thunks that a given method decl will need.
+ /// \brief Contains all thunks that a given method decl will need.
ThunksMapTy Thunks;
- /// ComputeVTableRelatedInformation - Compute and store all vtable related
- /// information (vtable layout, vbase offset offsets, thunks etc) for the
- /// given record decl.
+ /// Compute and store all vtable related information (vtable layout, vbase
+ /// offset offsets, thunks etc) for the given record decl.
void ComputeVTableRelatedInformation(const CXXRecordDecl *RD);
public:
return &I->second;
}
- /// getMethodVTableIndex - Return the index (relative to the vtable address
- /// point) where the function pointer for the given virtual function is
- /// stored.
+ /// \brief Locate a virtual function in the vtable.
+ ///
+ /// Return the index (relative to the vtable address point) where the
+ /// function pointer for the given virtual function is stored.
uint64_t getMethodVTableIndex(GlobalDecl GD);
- /// getVirtualBaseOffsetOffset - Return the offset in chars (relative to the
- /// vtable address point) where the offset of the virtual base that contains
- /// the given base is stored, otherwise, if no virtual base contains the given
- /// class, return 0. Base must be a virtual base class or an unambigious
- /// base.
+ /// Return the offset in chars (relative to the vtable address point) where
+ /// the offset of the virtual base that contains the given base is stored,
+ /// otherwise, if no virtual base contains the given class, return 0.
+ ///
+ /// Base must be a virtual base class or an unambiguous base.
CharUnits getVirtualBaseOffsetOffset(const CXXRecordDecl *RD,
const CXXRecordDecl *VBase);
};