[llvm-branch-commits] [cfe-branch] r102075 - in /cfe/branches/Apple/williamson: include/clang/Basic/ lib/CodeGen/ lib/Frontend/ lib/Sema/

Daniel Dunbar daniel at zuster.org
Thu Apr 22 10:01:20 PDT 2010


Author: ddunbar
Date: Thu Apr 22 12:01:20 2010
New Revision: 102075

URL: http://llvm.org/viewvc/llvm-project?rev=102075&view=rev
Log:
Vtable -> VTable renames across the board.

Modified:
    cfe/branches/Apple/williamson/include/clang/Basic/LangOptions.h
    cfe/branches/Apple/williamson/lib/CodeGen/CGCXX.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.h
    cfe/branches/Apple/williamson/lib/CodeGen/CGExprAgg.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGExprCXX.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGExprConstant.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGRTTI.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGRecordLayoutBuilder.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.h
    cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.h
    cfe/branches/Apple/williamson/lib/CodeGen/CodeGenTypes.h
    cfe/branches/Apple/williamson/lib/CodeGen/Mangle.cpp
    cfe/branches/Apple/williamson/lib/CodeGen/Mangle.h
    cfe/branches/Apple/williamson/lib/Frontend/CompilerInvocation.cpp
    cfe/branches/Apple/williamson/lib/Sema/SemaDeclCXX.cpp

Modified: cfe/branches/Apple/williamson/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/include/clang/Basic/LangOptions.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/include/clang/Basic/LangOptions.h (original)
+++ cfe/branches/Apple/williamson/include/clang/Basic/LangOptions.h Thu Apr 22 12:01:20 2010
@@ -99,7 +99,7 @@
                                   // elided if possible.
   unsigned CatchUndefined    : 1; // Generate code to check for undefined ops.
   unsigned DumpRecordLayouts : 1; /// Dump the layout of IRgen'd records.
-  unsigned DumpVtableLayouts : 1; /// Dump the layouts of emitted vtables.
+  unsigned DumpVTableLayouts : 1; /// Dump the layouts of emitted vtables.
 
   // FIXME: This is just a temporary option, for testing purposes.
   unsigned NoBitFieldTypeAlign : 1;
@@ -174,7 +174,7 @@
     ShortWChar = 0;
     CatchUndefined = 0;
     DumpRecordLayouts = 0;
-    DumpVtableLayouts = 0;
+    DumpVTableLayouts = 0;
     NoBitFieldTypeAlign = 0;
   }
 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGCXX.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGCXX.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGCXX.cpp Thu Apr 22 12:01:20 2010
@@ -297,15 +297,15 @@
   getMangleContext().mangleCXXDtor(D, Type, Name.getBuffer());
 }
 
-static llvm::Value *BuildVirtualCall(CodeGenFunction &CGF, uint64_t VtableIndex, 
+static llvm::Value *BuildVirtualCall(CodeGenFunction &CGF, uint64_t VTableIndex, 
                                      llvm::Value *This, const llvm::Type *Ty) {
   Ty = Ty->getPointerTo()->getPointerTo()->getPointerTo();
   
-  llvm::Value *Vtable = CGF.Builder.CreateBitCast(This, Ty);
-  Vtable = CGF.Builder.CreateLoad(Vtable);
+  llvm::Value *VTable = CGF.Builder.CreateBitCast(This, Ty);
+  VTable = CGF.Builder.CreateLoad(VTable);
   
   llvm::Value *VFuncPtr = 
-    CGF.Builder.CreateConstInBoundsGEP1_64(Vtable, VtableIndex, "vfn");
+    CGF.Builder.CreateConstInBoundsGEP1_64(VTable, VTableIndex, "vfn");
   return CGF.Builder.CreateLoad(VFuncPtr);
 }
 
@@ -313,7 +313,7 @@
 CodeGenFunction::BuildVirtualCall(const CXXMethodDecl *MD, llvm::Value *This,
                                   const llvm::Type *Ty) {
   MD = MD->getCanonicalDecl();
-  uint64_t VTableIndex = CGM.getVTables().getMethodVtableIndex(MD);
+  uint64_t VTableIndex = CGM.getVTables().getMethodVTableIndex(MD);
   
   return ::BuildVirtualCall(*this, VTableIndex, This, Ty);
 }
@@ -323,7 +323,7 @@
                                   llvm::Value *&This, const llvm::Type *Ty) {
   DD = cast<CXXDestructorDecl>(DD->getCanonicalDecl());
   uint64_t VTableIndex = 
-    CGM.getVTables().getMethodVtableIndex(GlobalDecl(DD, Type));
+    CGM.getVTables().getMethodVTableIndex(GlobalDecl(DD, Type));
 
   return ::BuildVirtualCall(*this, VTableIndex, This, Ty);
 }

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGCall.cpp Thu Apr 22 12:01:20 2010
@@ -528,7 +528,7 @@
 }
 
 const llvm::Type *
-CodeGenTypes::GetFunctionTypeForVtable(const CXXMethodDecl *MD) {
+CodeGenTypes::GetFunctionTypeForVTable(const CXXMethodDecl *MD) {
   const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>();
   
   if (!HasIncompleteReturnTypeOrArgumentTypes(FPT))

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.cpp Thu Apr 22 12:01:20 2010
@@ -626,7 +626,7 @@
     // It doesn't make sense to give a virtual destructor a vtable index,
     // since a single destructor has two entries in the vtable.
     if (!isa<CXXDestructorDecl>(Method))
-      VIndex = CGM.getVTables().getMethodVtableIndex(Method);
+      VIndex = CGM.getVTables().getMethodVTableIndex(Method);
     ContainingType = RecordTy;
   }
 
@@ -734,8 +734,8 @@
   return VTablePtrType;
 }
 
-/// getVtableName - Get vtable name for the given Class.
-llvm::StringRef CGDebugInfo::getVtableName(const CXXRecordDecl *RD) {
+/// getVTableName - Get vtable name for the given Class.
+llvm::StringRef CGDebugInfo::getVTableName(const CXXRecordDecl *RD) {
   // Otherwise construct gdb compatible name name.
   std::string Name = "_vptr$" + RD->getNameAsString();
 
@@ -746,10 +746,10 @@
 }
 
 
-/// CollectVtableInfo - If the C++ class has vtable info then insert appropriate
+/// CollectVTableInfo - If the C++ class has vtable info then insert appropriate
 /// debug info entry in EltTys vector.
 void CGDebugInfo::
-CollectVtableInfo(const CXXRecordDecl *RD, llvm::DIFile Unit,
+CollectVTableInfo(const CXXRecordDecl *RD, llvm::DIFile Unit,
                   llvm::SmallVectorImpl<llvm::DIDescriptor> &EltTys) {
   const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(RD);
 
@@ -764,7 +764,7 @@
   unsigned Size = CGM.getContext().getTypeSize(CGM.getContext().VoidPtrTy);
   llvm::DIType VPTR
     = DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_member, Unit,
-                                     getVtableName(RD), Unit,
+                                     getVTableName(RD), Unit,
                                      0, Size, 0, 0, 0, 
                                      getOrCreateVTablePtrType(Unit));
   EltTys.push_back(VPTR);
@@ -832,7 +832,7 @@
   const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(RD);
   if (CXXDecl) {
     CollectCXXBases(CXXDecl, Unit, EltTys, FwdDecl);
-    CollectVtableInfo(CXXDecl, Unit, EltTys);
+    CollectVTableInfo(CXXDecl, Unit, EltTys);
   }
   CollectRecordFields(RD, Unit, EltTys);
   llvm::MDNode *ContainingType = NULL;

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.h (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGDebugInfo.h Thu Apr 22 12:01:20 2010
@@ -112,7 +112,7 @@
   void CollectRecordFields(const RecordDecl *Decl, llvm::DIFile F,
                            llvm::SmallVectorImpl<llvm::DIDescriptor> &E);
 
-  void CollectVtableInfo(const CXXRecordDecl *Decl,
+  void CollectVTableInfo(const CXXRecordDecl *Decl,
                          llvm::DIFile F,
                          llvm::SmallVectorImpl<llvm::DIDescriptor> &EltTys);
 
@@ -201,8 +201,8 @@
   /// is stored on the side.
   llvm::StringRef getFunctionName(const FunctionDecl *FD);
 
-  /// getVtableName - Get vtable name for the given Class.
-  llvm::StringRef getVtableName(const CXXRecordDecl *Decl);
+  /// getVTableName - Get vtable name for the given Class.
+  llvm::StringRef getVTableName(const CXXRecordDecl *Decl);
 
 };
 } // namespace CodeGen

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGExprAgg.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGExprAgg.cpp Thu Apr 22 12:01:20 2010
@@ -333,7 +333,7 @@
   llvm::Value *FuncPtr;
   
   if (MD->isVirtual()) {
-    int64_t Index = CGF.CGM.getVTables().getMethodVtableIndex(MD);
+    int64_t Index = CGF.CGM.getVTables().getMethodVTableIndex(MD);
     
     // Itanium C++ ABI 2.3:
     //   For a non-virtual function, this field is a simple function pointer. 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGExprCXX.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGExprCXX.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGExprCXX.cpp Thu Apr 22 12:01:20 2010
@@ -205,20 +205,20 @@
   Builder.CreateCondBr(IsVirtual, FnVirtual, FnNonVirtual);
   EmitBlock(FnVirtual);
   
-  const llvm::Type *VtableTy = 
+  const llvm::Type *VTableTy = 
     FTy->getPointerTo()->getPointerTo();
 
-  llvm::Value *Vtable = Builder.CreateBitCast(This, VtableTy->getPointerTo());
-  Vtable = Builder.CreateLoad(Vtable);
+  llvm::Value *VTable = Builder.CreateBitCast(This, VTableTy->getPointerTo());
+  VTable = Builder.CreateLoad(VTable);
   
-  Vtable = Builder.CreateBitCast(Vtable, Int8PtrTy);
-  llvm::Value *VtableOffset = 
+  VTable = Builder.CreateBitCast(VTable, Int8PtrTy);
+  llvm::Value *VTableOffset = 
     Builder.CreateSub(FnAsInt, llvm::ConstantInt::get(PtrDiffTy, 1));
   
-  Vtable = Builder.CreateGEP(Vtable, VtableOffset, "fn");
-  Vtable = Builder.CreateBitCast(Vtable, VtableTy);
+  VTable = Builder.CreateGEP(VTable, VTableOffset, "fn");
+  VTable = Builder.CreateBitCast(VTable, VTableTy);
   
-  llvm::Value *VirtualFn = Builder.CreateLoad(Vtable, "virtualfn");
+  llvm::Value *VirtualFn = Builder.CreateLoad(VTable, "virtualfn");
   
   EmitBranch(FnEnd);
   EmitBlock(FnNonVirtual);

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGExprConstant.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGExprConstant.cpp Thu Apr 22 12:01:20 2010
@@ -446,7 +446,7 @@
     
     // Get the function pointer (or index if this is a virtual function).
     if (MD->isVirtual()) {
-      uint64_t Index = CGM.getVTables().getMethodVtableIndex(MD);
+      uint64_t Index = CGM.getVTables().getMethodVTableIndex(MD);
 
       // Itanium C++ ABI 2.3:
       //   For a non-virtual function, this field is a simple function pointer. 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGRTTI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGRTTI.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGRTTI.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGRTTI.cpp Thu Apr 22 12:01:20 2010
@@ -31,8 +31,8 @@
   /// descriptor of the given type.
   llvm::Constant *GetAddrOfExternalRTTIDescriptor(QualType Ty);
   
-  /// BuildVtablePointer - Build the vtable pointer for the given type.
-  void BuildVtablePointer(const Type *Ty);
+  /// BuildVTablePointer - Build the vtable pointer for the given type.
+  void BuildVTablePointer(const Type *Ty);
   
   /// BuildSIClassTypeInfo - Build an abi::__si_class_type_info, used for single
   /// inheritance, according to the Itanium C++ ABI, 2.9.5p6b.
@@ -337,7 +337,7 @@
     if (const RecordType *Record = dyn_cast<RecordType>(Ty)) {
       const CXXRecordDecl *RD = cast<CXXRecordDecl>(Record->getDecl());
       if (RD->isDynamicClass())
-        return CodeGenModule::getVtableLinkage(RD);
+        return CodeGenModule::getVTableLinkage(RD);
     }
 
     return llvm::GlobalValue::WeakODRLinkage;
@@ -375,8 +375,8 @@
   return true;
 }
 
-void RTTIBuilder::BuildVtablePointer(const Type *Ty) {
-  const char *VtableName;
+void RTTIBuilder::BuildVTablePointer(const Type *Ty) {
+  const char *VTableName;
 
   switch (Ty->getTypeClass()) {
   default: assert(0 && "Unhandled type!");
@@ -386,24 +386,24 @@
   case Type::Vector:
   case Type::ExtVector:
     // abi::__fundamental_type_info.
-    VtableName = "_ZTVN10__cxxabiv123__fundamental_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv123__fundamental_type_infoE";
     break;
 
   case Type::ConstantArray:
   case Type::IncompleteArray:
     // abi::__array_type_info.
-    VtableName = "_ZTVN10__cxxabiv117__array_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv117__array_type_infoE";
     break;
 
   case Type::FunctionNoProto:
   case Type::FunctionProto:
     // abi::__function_type_info.
-    VtableName = "_ZTVN10__cxxabiv120__function_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv120__function_type_infoE";
     break;
 
   case Type::Enum:
     // abi::__enum_type_info.
-    VtableName = "_ZTVN10__cxxabiv116__enum_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv116__enum_type_infoE";
     break;
       
   case Type::Record: {
@@ -412,13 +412,13 @@
     
     if (!RD->hasDefinition() || !RD->getNumBases()) {
       // abi::__class_type_info.
-      VtableName = "_ZTVN10__cxxabiv117__class_type_infoE";
+      VTableName = "_ZTVN10__cxxabiv117__class_type_infoE";
     } else if (CanUseSingleInheritance(RD)) {
       // abi::__si_class_type_info.
-      VtableName = "_ZTVN10__cxxabiv120__si_class_type_infoE";
+      VTableName = "_ZTVN10__cxxabiv120__si_class_type_infoE";
     } else {
       // abi::__vmi_class_type_info.
-      VtableName = "_ZTVN10__cxxabiv121__vmi_class_type_infoE";
+      VTableName = "_ZTVN10__cxxabiv121__vmi_class_type_infoE";
     }
     
     break;
@@ -426,27 +426,27 @@
 
   case Type::Pointer:
     // abi::__pointer_type_info.
-    VtableName = "_ZTVN10__cxxabiv119__pointer_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv119__pointer_type_infoE";
     break;
 
   case Type::MemberPointer:
     // abi::__pointer_to_member_type_info.
-    VtableName = "_ZTVN10__cxxabiv129__pointer_to_member_type_infoE";
+    VTableName = "_ZTVN10__cxxabiv129__pointer_to_member_type_infoE";
     break;
   }
 
-  llvm::Constant *Vtable = 
-    CGM.getModule().getOrInsertGlobal(VtableName, Int8PtrTy);
+  llvm::Constant *VTable = 
+    CGM.getModule().getOrInsertGlobal(VTableName, Int8PtrTy);
     
   const llvm::Type *PtrDiffTy = 
     CGM.getTypes().ConvertType(CGM.getContext().getPointerDiffType());
 
   // The vtable address point is 2.
   llvm::Constant *Two = llvm::ConstantInt::get(PtrDiffTy, 2);
-  Vtable = llvm::ConstantExpr::getInBoundsGetElementPtr(Vtable, &Two, 1);
-  Vtable = llvm::ConstantExpr::getBitCast(Vtable, Int8PtrTy);
+  VTable = llvm::ConstantExpr::getInBoundsGetElementPtr(VTable, &Two, 1);
+  VTable = llvm::ConstantExpr::getBitCast(VTable, Int8PtrTy);
 
-  Fields.push_back(Vtable);
+  Fields.push_back(VTable);
 }
 
 llvm::Constant *RTTIBuilder::BuildTypeInfo(QualType Ty, bool Force) {
@@ -469,7 +469,7 @@
   llvm::GlobalVariable::LinkageTypes Linkage = getTypeInfoLinkage(Ty);
 
   // Add the vtable pointer.
-  BuildVtablePointer(cast<Type>(Ty));
+  BuildVTablePointer(cast<Type>(Ty));
   
   // And the name.
   Fields.push_back(BuildName(Ty, DecideHidden(Ty), Linkage));

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGRecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGRecordLayoutBuilder.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGRecordLayoutBuilder.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGRecordLayoutBuilder.cpp Thu Apr 22 12:01:20 2010
@@ -395,7 +395,7 @@
       llvm::Type::getInt8PtrTy(Types.getLLVMContext());
 
     assert(NextFieldOffsetInBytes == 0 &&
-           "Vtable pointer must come first!");
+           "VTable pointer must come first!");
     AppendField(NextFieldOffsetInBytes, Int8PtrTy->getPointerTo());
   }
 }

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.cpp Thu Apr 22 12:01:20 2010
@@ -1,4 +1,4 @@
-//===--- CGVtables.cpp - Emit LLVM Code for C++ vtables -------------------===//
+//===--- CGVTables.cpp - Emit LLVM Code for C++ vtables -------------------===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -2365,7 +2365,7 @@
   
 }
 
-void CodeGenVTables::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
+void CodeGenVTables::ComputeMethodVTableIndices(const CXXRecordDecl *RD) {
   
   // Itanium C++ ABI 2.5.2:
   //   The order of the virtual function pointers in a virtual table is the 
@@ -2422,12 +2422,12 @@
             cast<CXXDestructorDecl>(OverriddenMD);
           
           // Add both the complete and deleting entries.
-          MethodVtableIndices[GlobalDecl(DD, Dtor_Complete)] = 
-            getMethodVtableIndex(GlobalDecl(OverriddenDD, Dtor_Complete));
-          MethodVtableIndices[GlobalDecl(DD, Dtor_Deleting)] = 
-            getMethodVtableIndex(GlobalDecl(OverriddenDD, Dtor_Deleting));
+          MethodVTableIndices[GlobalDecl(DD, Dtor_Complete)] = 
+            getMethodVTableIndex(GlobalDecl(OverriddenDD, Dtor_Complete));
+          MethodVTableIndices[GlobalDecl(DD, Dtor_Deleting)] = 
+            getMethodVTableIndex(GlobalDecl(OverriddenDD, Dtor_Deleting));
         } else {
-          MethodVtableIndices[MD] = getMethodVtableIndex(OverriddenMD);
+          MethodVTableIndices[MD] = getMethodVTableIndex(OverriddenMD);
         }
         
         // We don't need to add an entry for this method.
@@ -2444,13 +2444,13 @@
       } 
 
       // Add the complete dtor.
-      MethodVtableIndices[GlobalDecl(DD, Dtor_Complete)] = CurrentIndex++;
+      MethodVTableIndices[GlobalDecl(DD, Dtor_Complete)] = CurrentIndex++;
       
       // Add the deleting dtor.
-      MethodVtableIndices[GlobalDecl(DD, Dtor_Deleting)] = CurrentIndex++;
+      MethodVTableIndices[GlobalDecl(DD, Dtor_Deleting)] = CurrentIndex++;
     } else {
       // Add the entry.
-      MethodVtableIndices[MD] = CurrentIndex++;
+      MethodVTableIndices[MD] = CurrentIndex++;
     }
   }
 
@@ -2460,11 +2460,11 @@
     //   its entries come after the declared virtual function pointers.
 
     // Add the complete dtor.
-    MethodVtableIndices[GlobalDecl(ImplicitVirtualDtor, Dtor_Complete)] = 
+    MethodVTableIndices[GlobalDecl(ImplicitVirtualDtor, Dtor_Complete)] = 
       CurrentIndex++;
     
     // Add the deleting dtor.
-    MethodVtableIndices[GlobalDecl(ImplicitVirtualDtor, Dtor_Deleting)] = 
+    MethodVTableIndices[GlobalDecl(ImplicitVirtualDtor, Dtor_Deleting)] = 
       CurrentIndex++;
   }
   
@@ -2477,24 +2477,24 @@
   if (I != NumVirtualFunctionPointers.end())
     return I->second;
 
-  ComputeMethodVtableIndices(RD);
+  ComputeMethodVTableIndices(RD);
 
   I = NumVirtualFunctionPointers.find(RD);
   assert(I != NumVirtualFunctionPointers.end() && "Did not find entry!");
   return I->second;
 }
       
-uint64_t CodeGenVTables::getMethodVtableIndex(GlobalDecl GD) {
-  MethodVtableIndicesTy::iterator I = MethodVtableIndices.find(GD);
-  if (I != MethodVtableIndices.end())
+uint64_t CodeGenVTables::getMethodVTableIndex(GlobalDecl GD) {
+  MethodVTableIndicesTy::iterator I = MethodVTableIndices.find(GD);
+  if (I != MethodVTableIndices.end())
     return I->second;
   
   const CXXRecordDecl *RD = cast<CXXMethodDecl>(GD.getDecl())->getParent();
 
-  ComputeMethodVtableIndices(RD);
+  ComputeMethodVTableIndices(RD);
 
-  I = MethodVtableIndices.find(GD);
-  assert(I != MethodVtableIndices.end() && "Did not find index!");
+  I = MethodVTableIndices.find(GD);
+  assert(I != MethodVTableIndices.end() && "Did not find index!");
   return I->second;
 }
 
@@ -2550,7 +2550,7 @@
   else
     getMangleContext().mangleThunk(MD, Thunk, Name);
   
-  const llvm::Type *Ty = getTypes().GetFunctionTypeForVtable(MD);
+  const llvm::Type *Ty = getTypes().GetFunctionTypeForVTable(MD);
   return GetOrCreateLLVMFunction(Name, Ty, GlobalDecl());
 }
 
@@ -2733,7 +2733,7 @@
   // There's already a declaration with the same name, check if it has the same
   // type or if we need to replace it.
   if (cast<llvm::GlobalValue>(Entry)->getType()->getElementType() != 
-      CGM.getTypes().GetFunctionTypeForVtable(MD)) {
+      CGM.getTypes().GetFunctionTypeForVTable(MD)) {
     llvm::GlobalValue *OldThunkFn = cast<llvm::GlobalValue>(Entry);
     
     // If the types mismatch then we have to rewrite the definition.
@@ -2941,7 +2941,7 @@
           NextVTableThunkIndex++;
         } else {
           const CXXMethodDecl *MD = cast<CXXMethodDecl>(GD.getDecl());
-          const llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVtable(MD);
+          const llvm::Type *Ty = CGM.getTypes().GetFunctionTypeForVTable(MD);
         
           Init = CGM.GetAddrOfFunction(GD, Ty);
         }
@@ -3008,7 +3008,7 @@
 
 llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTable(const CXXRecordDecl *RD) {
   llvm::SmallString<256> OutName;
-  CGM.getMangleContext().mangleCXXVtable(RD, OutName);
+  CGM.getMangleContext().mangleCXXVTable(RD, OutName);
   llvm::StringRef Name = OutName.str();
 
   ComputeVTableRelatedInformation(RD);
@@ -3026,7 +3026,7 @@
                                      llvm::GlobalVariable::LinkageTypes Linkage,
                                      const CXXRecordDecl *RD) {
   // Dump the vtable layout if necessary.
-  if (CGM.getLangOptions().DumpVtableLayouts) {
+  if (CGM.getLangOptions().DumpVTableLayouts) {
     VTableBuilder Builder(*this, RD, 0, /*MostDerivedClassIsVirtual=*/0, RD);
 
     Builder.dumpLayout(llvm::errs());
@@ -3056,7 +3056,7 @@
                         /*MostDerivedClassIsVirtual=*/BaseIsVirtual, RD);
 
   // Dump the vtable layout if necessary.
-  if (CGM.getLangOptions().DumpVtableLayouts)
+  if (CGM.getLangOptions().DumpVTableLayouts)
     Builder.dumpLayout(llvm::errs());
 
   // Add the address points.
@@ -3065,7 +3065,7 @@
 
   // Get the mangled construction vtable name.
   llvm::SmallString<256> OutName;
-  CGM.getMangleContext().mangleCXXCtorVtable(RD, Base.getBaseOffset() / 8, 
+  CGM.getMangleContext().mangleCXXCtorVTable(RD, Base.getBaseOffset() / 8, 
                                              Base.getBase(), OutName);
   llvm::StringRef Name = OutName.str();
 
@@ -3099,9 +3099,9 @@
 void 
 CodeGenVTables::GenerateClassData(llvm::GlobalVariable::LinkageTypes Linkage,
                                   const CXXRecordDecl *RD) {
-  llvm::GlobalVariable *&VTable = Vtables[RD];
+  llvm::GlobalVariable *&VTable = VTables[RD];
   if (VTable) {
-    assert(VTable->getInitializer() && "Vtable doesn't have a definition!");
+    assert(VTable->getInitializer() && "VTable doesn't have a definition!");
     return;
   }
 
@@ -3160,11 +3160,11 @@
       return;
   }
 
-  if (Vtables.count(RD))
+  if (VTables.count(RD))
     return;
 
   if (RDKind == TSK_ImplicitInstantiation)
-    CGM.DeferredVtables.push_back(RD);
+    CGM.DeferredVTables.push_back(RD);
   else
-    GenerateClassData(CGM.getVtableLinkage(RD), RD);
+    GenerateClassData(CGM.getVTableLinkage(RD), RD);
 }

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.h (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CGVTables.h Thu Apr 22 12:01:20 2010
@@ -180,10 +180,10 @@
 class CodeGenVTables {
   CodeGenModule &CGM;
 
-  /// MethodVtableIndices - Contains the index (relative to the vtable address
+  /// MethodVTableIndices - 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 llvm::DenseMap<GlobalDecl, int64_t> MethodVTableIndicesTy;
+  MethodVTableIndicesTy MethodVTableIndices;
 
   typedef std::pair<const CXXRecordDecl *,
                     const CXXRecordDecl *> ClassPairTy;
@@ -195,8 +195,8 @@
     VirtualBaseClassOffsetOffsetsMapTy;
   VirtualBaseClassOffsetOffsetsMapTy VirtualBaseClassOffsetOffsets;
 
-  /// Vtables - All the vtables which have been defined.
-  llvm::DenseMap<const CXXRecordDecl *, llvm::GlobalVariable *> Vtables;
+  /// VTables - All the vtables which have been defined.
+  llvm::DenseMap<const CXXRecordDecl *, llvm::GlobalVariable *> VTables;
   
   /// NumVirtualFunctionPointers - Contains the number of virtual function 
   /// pointers in the vtable for a given record decl.
@@ -265,7 +265,7 @@
   /// pointers in the vtable for a given record decl.
   uint64_t getNumVirtualFunctionPointers(const CXXRecordDecl *RD);
   
-  void ComputeMethodVtableIndices(const CXXRecordDecl *RD);
+  void ComputeMethodVTableIndices(const CXXRecordDecl *RD);
 
   llvm::GlobalVariable *GenerateVTT(llvm::GlobalVariable::LinkageTypes Linkage,
                                     bool GenerateDefinition,
@@ -309,10 +309,10 @@
   uint64_t getSecondaryVirtualPointerIndex(const CXXRecordDecl *RD,
                                            BaseSubobject Base);
 
-  /// getMethodVtableIndex - Return the index (relative to the vtable address
+  /// getMethodVTableIndex - 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);
+  uint64_t getMethodVTableIndex(GlobalDecl GD);
 
   /// getVirtualBaseOffsetOffset - Return the offset in bytes (relative to the
   /// vtable address point) where the offset of the virtual base that contains 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.cpp Thu Apr 22 12:01:20 2010
@@ -492,11 +492,11 @@
   // previously unused static decl may become used during the generation of code
   // for a static function, iterate until no  changes are made.
 
-  while (!DeferredDeclsToEmit.empty() || !DeferredVtables.empty()) {
-    if (!DeferredVtables.empty()) {
-      const CXXRecordDecl *RD = DeferredVtables.back();
-      DeferredVtables.pop_back();
-      getVTables().GenerateClassData(getVtableLinkage(RD), RD);
+  while (!DeferredDeclsToEmit.empty() || !DeferredVTables.empty()) {
+    if (!DeferredVTables.empty()) {
+      const CXXRecordDecl *RD = DeferredVTables.back();
+      DeferredVTables.pop_back();
+      getVTables().GenerateClassData(getVTableLinkage(RD), RD);
       continue;
     }
 
@@ -962,7 +962,7 @@
 }
 
 llvm::GlobalVariable::LinkageTypes 
-CodeGenModule::getVtableLinkage(const CXXRecordDecl *RD) {
+CodeGenModule::getVTableLinkage(const CXXRecordDecl *RD) {
   if (RD->isInAnonymousNamespace() || !RD->hasLinkage())
     return llvm::GlobalVariable::InternalLinkage;
 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.h (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CodeGenModule.h Thu Apr 22 12:01:20 2010
@@ -417,16 +417,16 @@
   llvm::GlobalVariable::LinkageTypes
   getFunctionLinkage(const FunctionDecl *FD);
 
-  /// getVtableLinkage - Return the appropriate linkage for the vtable, VTT,
+  /// getVTableLinkage - Return the appropriate linkage for the vtable, VTT,
   /// and type information of the given class.
   static llvm::GlobalVariable::LinkageTypes 
-  getVtableLinkage(const CXXRecordDecl *RD);
+  getVTableLinkage(const CXXRecordDecl *RD);
 
   /// GetTargetTypeStoreSize - Return the store size, in character units, of
   /// the given LLVM type.
   CharUnits GetTargetTypeStoreSize(const llvm::Type *Ty) const;
 
-  std::vector<const CXXRecordDecl*> DeferredVtables;
+  std::vector<const CXXRecordDecl*> DeferredVTables;
 
 private:
   llvm::GlobalValue *GetGlobalValue(llvm::StringRef Ref);

Modified: cfe/branches/Apple/williamson/lib/CodeGen/CodeGenTypes.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/CodeGenTypes.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/CodeGenTypes.h (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/CodeGenTypes.h Thu Apr 22 12:01:20 2010
@@ -123,10 +123,10 @@
   const llvm::FunctionType *GetFunctionType(GlobalDecl GD);
 
 
-  /// GetFunctionTypeForVtable - Get the LLVM function type for use in a vtable,
+  /// GetFunctionTypeForVTable - Get the LLVM function type for use in a vtable,
   /// given a CXXMethodDecl. If the method to has an incomplete return type, 
   /// and/or incomplete argument types, this will return the opaque type.
-  const llvm::Type *GetFunctionTypeForVtable(const CXXMethodDecl *MD);
+  const llvm::Type *GetFunctionTypeForVTable(const CXXMethodDecl *MD);
                                                      
   const CGRecordLayout &getCGRecordLayout(const RecordDecl*) const;
 

Modified: cfe/branches/Apple/williamson/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/Mangle.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/Mangle.cpp (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/Mangle.cpp Thu Apr 22 12:01:20 2010
@@ -1966,7 +1966,7 @@
   Mangler.mangleName(D);
 }
 
-void MangleContext::mangleCXXVtable(const CXXRecordDecl *RD,
+void MangleContext::mangleCXXVTable(const CXXRecordDecl *RD,
                                     llvm::SmallVectorImpl<char> &Res) {
   // <special-name> ::= TV <type>  # virtual table
   CXXNameMangler Mangler(*this, Res);
@@ -1982,7 +1982,7 @@
   Mangler.mangleName(RD);
 }
 
-void MangleContext::mangleCXXCtorVtable(const CXXRecordDecl *RD, int64_t Offset,
+void MangleContext::mangleCXXCtorVTable(const CXXRecordDecl *RD, int64_t Offset,
                                         const CXXRecordDecl *Type,
                                         llvm::SmallVectorImpl<char> &Res) {
   // <special-name> ::= TC <type> <offset number> _ <base type>

Modified: cfe/branches/Apple/williamson/lib/CodeGen/Mangle.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/CodeGen/Mangle.h?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/CodeGen/Mangle.h (original)
+++ cfe/branches/Apple/williamson/lib/CodeGen/Mangle.h Thu Apr 22 12:01:20 2010
@@ -103,9 +103,9 @@
                           const ThisAdjustment &ThisAdjustment,
                           llvm::SmallVectorImpl<char> &);
   void mangleGuardVariable(const VarDecl *D, llvm::SmallVectorImpl<char> &);
-  void mangleCXXVtable(const CXXRecordDecl *RD, llvm::SmallVectorImpl<char> &);
+  void mangleCXXVTable(const CXXRecordDecl *RD, llvm::SmallVectorImpl<char> &);
   void mangleCXXVTT(const CXXRecordDecl *RD, llvm::SmallVectorImpl<char> &);
-  void mangleCXXCtorVtable(const CXXRecordDecl *RD, int64_t Offset,
+  void mangleCXXCtorVTable(const CXXRecordDecl *RD, int64_t Offset,
                            const CXXRecordDecl *Type,
                            llvm::SmallVectorImpl<char> &);
   void mangleCXXRTTI(QualType T, llvm::SmallVectorImpl<char> &);

Modified: cfe/branches/Apple/williamson/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/Frontend/CompilerInvocation.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/branches/Apple/williamson/lib/Frontend/CompilerInvocation.cpp Thu Apr 22 12:01:20 2010
@@ -528,7 +528,7 @@
     Res.push_back("-static-define");
   if (Opts.DumpRecordLayouts)
     Res.push_back("-fdump-record-layouts");
-  if (Opts.DumpVtableLayouts)
+  if (Opts.DumpVTableLayouts)
     Res.push_back("-fdump-vtable-layouts");
   if (Opts.NoBitFieldTypeAlign)
     Res.push_back("-fno-bitfield-type-alignment");
@@ -1226,7 +1226,7 @@
   Opts.SjLjExceptions = Args.hasArg(OPT_fsjlj_exceptions);
   Opts.Static = Args.hasArg(OPT_static_define);
   Opts.DumpRecordLayouts = Args.hasArg(OPT_fdump_record_layouts);
-  Opts.DumpVtableLayouts = Args.hasArg(OPT_fdump_vtable_layouts);
+  Opts.DumpVTableLayouts = Args.hasArg(OPT_fdump_vtable_layouts);
   Opts.NoBitFieldTypeAlign = Args.hasArg(OPT_fno_bitfield_type_align);
   Opts.OptimizeSize = 0;
 

Modified: cfe/branches/Apple/williamson/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/williamson/lib/Sema/SemaDeclCXX.cpp?rev=102075&r1=102074&r2=102075&view=diff
==============================================================================
--- cfe/branches/Apple/williamson/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/branches/Apple/williamson/lib/Sema/SemaDeclCXX.cpp Thu Apr 22 12:01:20 2010
@@ -5432,7 +5432,7 @@
   return Dcl;
 }
 
-static bool needsVtable(CXXMethodDecl *MD, ASTContext &Context) {
+static bool needsVTable(CXXMethodDecl *MD, ASTContext &Context) {
   // Ignore dependent types.
   if (MD->isDependentContext())
     return false;
@@ -5495,7 +5495,7 @@
 
   // We will need to mark all of the virtual members as referenced to build the
   // vtable.
-  if (!needsVtable(MD, Context))
+  if (!needsVTable(MD, Context))
     return;
 
   TemplateSpecializationKind kind = RD->getTemplateSpecializationKind();





More information about the llvm-branch-commits mailing list