r185288 - Documentation cleanup: Mostly formatting \brief documentation, also fix a

James Dennett jdennett at google.com
Sun Jun 30 12:39:15 PDT 2013


Author: jdennett
Date: Sun Jun 30 14:39:15 2013
New Revision: 185288

URL: http://llvm.org/viewvc/llvm-project?rev=185288&view=rev
Log:
Documentation cleanup: Mostly formatting \brief documentation, also fix a
typo or two.

Modified:
    cfe/trunk/include/clang/AST/UnresolvedSet.h
    cfe/trunk/include/clang/AST/VTTBuilder.h
    cfe/trunk/include/clang/AST/VTableBuilder.h

Modified: cfe/trunk/include/clang/AST/UnresolvedSet.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/UnresolvedSet.h?rev=185288&r1=185287&r2=185288&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/UnresolvedSet.h (original)
+++ cfe/trunk/include/clang/AST/UnresolvedSet.h Sun Jun 30 14:39:15 2013
@@ -88,7 +88,7 @@ public:
   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;
 
@@ -177,7 +177,7 @@ private:
   }
 };
 
-/// A set of unresolved declarations 
+/// \brief A set of unresolved declarations.
 template <unsigned InlineCapacity> class UnresolvedSet :
     public UnresolvedSetImpl {
   SmallVector<DeclAccessPair, InlineCapacity> Decls;

Modified: cfe/trunk/include/clang/AST/VTTBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/VTTBuilder.h?rev=185288&r1=185287&r2=185288&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/VTTBuilder.h (original)
+++ cfe/trunk/include/clang/AST/VTTBuilder.h Sun Jun 30 14:39:15 2013
@@ -63,54 +63,50 @@ struct VTTComponent {
     : 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.
@@ -120,17 +116,17 @@ class VTTBuilder {
                                       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);
   
@@ -138,23 +134,22 @@ public:
   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;

Modified: cfe/trunk/include/clang/AST/VTableBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/VTableBuilder.h?rev=185288&r1=185287&r2=185288&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/VTableBuilder.h (original)
+++ cfe/trunk/include/clang/AST/VTableBuilder.h Sun Jun 30 14:39:15 2013
@@ -25,7 +25,7 @@
 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 {
@@ -35,15 +35,17 @@ public:
     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
   };
 
@@ -94,7 +96,7 @@ public:
     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);
   }
@@ -189,7 +191,7 @@ private:
 
   /// 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;
@@ -208,11 +210,11 @@ private:
   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;
@@ -275,8 +277,8 @@ public:
 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;
 
@@ -287,21 +289,21 @@ private:
   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:
@@ -340,16 +342,17 @@ 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);
 };





More information about the cfe-commits mailing list