r194202 - Minor refinement of VTableBuilder.h: fix wrong indentation, rename a struct field with a more appropriate name

Timur Iskhodzhanov timurrrr at google.com
Thu Nov 7 05:34:03 PST 2013


Author: timurrrr
Date: Thu Nov  7 07:34:02 2013
New Revision: 194202

URL: http://llvm.org/viewvc/llvm-project?rev=194202&view=rev
Log:
Minor refinement of VTableBuilder.h: fix wrong indentation, rename a struct field with a more appropriate name

Modified:
    cfe/trunk/include/clang/AST/VTableBuilder.h
    cfe/trunk/lib/AST/VTableBuilder.cpp
    cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp

Modified: cfe/trunk/include/clang/AST/VTableBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/VTableBuilder.h?rev=194202&r1=194201&r2=194202&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/VTableBuilder.h (original)
+++ cfe/trunk/include/clang/AST/VTableBuilder.h Thu Nov  7 07:34:02 2013
@@ -233,23 +233,21 @@ public:
   }
 
   vtable_component_iterator vtable_component_begin() const {
-   return VTableComponents.get();
+    return VTableComponents.get();
   }
 
   vtable_component_iterator vtable_component_end() const {
-   return VTableComponents.get()+NumVTableComponents;
+    return VTableComponents.get() + NumVTableComponents;
   }
 
-  uint64_t getNumVTableThunks() const {
-    return NumVTableThunks;
-  }
+  uint64_t getNumVTableThunks() const { return NumVTableThunks; }
 
   vtable_thunk_iterator vtable_thunk_begin() const {
-   return VTableThunks.get();
+    return VTableThunks.get();
   }
 
   vtable_thunk_iterator vtable_thunk_end() const {
-   return VTableThunks.get()+NumVTableThunks;
+    return VTableThunks.get() + NumVTableThunks;
   }
 
   uint64_t getAddressPoint(BaseSubobject Base) const {
@@ -414,27 +412,27 @@ public:
 
     /// This is the offset of the vfptr from the start of the last vbase, or the
     /// complete type if there are no virtual bases.
-    CharUnits VFTableOffset;
+    CharUnits VFPtrOffset;
 
     /// Method's index in the vftable.
     uint64_t Index;
 
     MethodVFTableLocation()
-        : VBTableIndex(0), VBase(0), VFTableOffset(CharUnits::Zero()),
+        : VBTableIndex(0), VBase(0), VFPtrOffset(CharUnits::Zero()),
           Index(0) {}
 
     MethodVFTableLocation(uint64_t VBTableIndex, const CXXRecordDecl *VBase,
-                          CharUnits VFTableOffset, uint64_t Index)
+                          CharUnits VFPtrOffset, uint64_t Index)
         : VBTableIndex(VBTableIndex), VBase(VBase),
-          VFTableOffset(VFTableOffset), Index(Index) {}
+          VFPtrOffset(VFPtrOffset), Index(Index) {}
 
     bool operator<(const MethodVFTableLocation &other) const {
       if (VBTableIndex != other.VBTableIndex) {
         assert(VBase != other.VBase);
         return VBTableIndex < other.VBTableIndex;
       }
-      if (VFTableOffset != other.VFTableOffset)
-        return VFTableOffset < other.VFTableOffset;
+      if (VFPtrOffset != other.VFPtrOffset)
+        return VFPtrOffset < other.VFPtrOffset;
       if (Index != other.Index)
         return Index < other.Index;
       return false;

Modified: cfe/trunk/lib/AST/VTableBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=194202&r1=194201&r2=194202&view=diff
==============================================================================
--- cfe/trunk/lib/AST/VTableBuilder.cpp (original)
+++ cfe/trunk/lib/AST/VTableBuilder.cpp Thu Nov  7 07:34:02 2013
@@ -3317,7 +3317,7 @@ void MicrosoftVTableContext::dumpMethodL
       IndicesMap[I->second] = MethodName;
     }
 
-    if (!I->second.VFTableOffset.isZero() || I->second.VBTableIndex != 0)
+    if (!I->second.VFPtrOffset.isZero() || I->second.VBTableIndex != 0)
       HasNonzeroOffset = true;
   }
 
@@ -3333,7 +3333,7 @@ void MicrosoftVTableContext::dumpMethodL
              I = IndicesMap.begin(),
              E = IndicesMap.end();
          I != E; ++I) {
-      CharUnits VFPtrOffset = I->first.VFTableOffset;
+      CharUnits VFPtrOffset = I->first.VFPtrOffset;
       uint64_t VBIndex = I->first.VBTableIndex;
       if (HasNonzeroOffset &&
           (VFPtrOffset != LastVFPtrOffset || VBIndex != LastVBIndex)) {

Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=194202&r1=194201&r2=194202&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Thu Nov  7 07:34:02 2013
@@ -128,7 +128,7 @@ public:
       // In this case, we just use a generic pointer type.
       // FIXME: might want to have a more precise type in the non-virtual
       // multiple inheritance case.
-      if (ML.VBase || !ML.VFTableOffset.isZero())
+      if (ML.VBase || !ML.VFPtrOffset.isZero())
         return 0;
     }
     return MD->getParent();
@@ -600,7 +600,7 @@ llvm::Value *MicrosoftCXXABI::adjustThis
 
   unsigned AS = cast<llvm::PointerType>(This->getType())->getAddressSpace();
   llvm::Type *charPtrTy = CGF.Int8Ty->getPointerTo(AS);
-  CharUnits StaticOffset = ML.VFTableOffset;
+  CharUnits StaticOffset = ML.VFPtrOffset;
   if (ML.VBase) {
     bool AvoidVirtualOffset = false;
     if (isa<CXXDestructorDecl>(MD) && GD.getDtorType() == Dtor_Base) {
@@ -723,7 +723,7 @@ llvm::Value *MicrosoftCXXABI::adjustThis
 
   MicrosoftVTableContext::MethodVFTableLocation ML =
       CGM.getMicrosoftVTableContext().getMethodVFTableLocation(LookupGD);
-  CharUnits Adjustment = ML.VFTableOffset;
+  CharUnits Adjustment = ML.VFPtrOffset;
   if (ML.VBase) {
     const ASTRecordLayout &DerivedLayout =
         CGF.getContext().getASTRecordLayout(MD->getParent());





More information about the cfe-commits mailing list