Vtable -> VTable renames across the board.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 93a182f..74cf113 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -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);
}
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index cb1ecc1..145d693 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -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))
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index bcbda8a..1fdb2e5 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -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;
diff --git a/lib/CodeGen/CGDebugInfo.h b/lib/CodeGen/CGDebugInfo.h
index 8397245..94da50c 100644
--- a/lib/CodeGen/CGDebugInfo.h
+++ b/lib/CodeGen/CGDebugInfo.h
@@ -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
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 4d5160f..32fab45 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -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.
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp
index 1fd1da8..934d2db 100644
--- a/lib/CodeGen/CGExprCXX.cpp
+++ b/lib/CodeGen/CGExprCXX.cpp
@@ -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);
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 82156f7..4f67f3d 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -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.
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 4e24bd2..5e3801d 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -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));
diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp
index 141ddd7..63e38f3 100644
--- a/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp
@@ -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());
}
}
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp
index 28530ec..159753a 100644
--- a/lib/CodeGen/CGVTables.cpp
+++ b/lib/CodeGen/CGVTables.cpp
@@ -1,4 +1,4 @@
-//===--- CGVtables.cpp - Emit LLVM Code for C++ vtables -------------------===//
+//===--- CGVTables.cpp - Emit LLVM Code for C++ vtables -------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -2362,7 +2362,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
@@ -2419,12 +2419,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.
@@ -2441,13 +2441,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++;
}
}
@@ -2457,11 +2457,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++;
}
@@ -2474,24 +2474,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;
}
@@ -2547,7 +2547,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());
}
@@ -2730,7 +2730,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.
@@ -2938,7 +2938,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);
}
@@ -3005,7 +3005,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);
@@ -3023,7 +3023,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());
@@ -3053,7 +3053,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.
@@ -3062,7 +3062,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();
@@ -3096,9 +3096,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;
}
@@ -3157,11 +3157,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);
}
diff --git a/lib/CodeGen/CGVTables.h b/lib/CodeGen/CGVTables.h
index d44fcfb..b4262fe 100644
--- a/lib/CodeGen/CGVTables.h
+++ b/lib/CodeGen/CGVTables.h
@@ -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
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 4a415d3..ab2f1c7 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -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;
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index e06e533..8db5a58 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -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);
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h
index 53c27c9..10e71e2 100644
--- a/lib/CodeGen/CodeGenTypes.h
+++ b/lib/CodeGen/CodeGenTypes.h
@@ -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;
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp
index 2b6e581..85a8468 100644
--- a/lib/CodeGen/Mangle.cpp
+++ b/lib/CodeGen/Mangle.cpp
@@ -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>
diff --git a/lib/CodeGen/Mangle.h b/lib/CodeGen/Mangle.h
index dc16730..da3626f 100644
--- a/lib/CodeGen/Mangle.h
+++ b/lib/CodeGen/Mangle.h
@@ -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> &);