Debug Info: constify and rename from generateRef to getRef.

No functionality change.

llvm-svn: 191696
This commit is contained in:
Manman Ren 2013-09-30 19:42:10 +00:00
parent df4432bb73
commit 1c604f3b2e
3 changed files with 11 additions and 11 deletions

View File

@ -211,7 +211,7 @@ namespace llvm {
/// Generate a reference to this DIScope. Uses the type identifier instead
/// of the actual MDNode if possible, to help type uniquing.
DIScopeRef generateRef();
DIScopeRef getRef() const;
};
/// Represents reference to a DIDescriptor, abstracts over direct and
@ -221,7 +221,7 @@ namespace llvm {
template <typename DescTy>
friend DescTy DIDescriptor::getFieldAs(unsigned Elt) const;
friend DIScopeRef DIScope::getContext() const;
friend DIScopeRef DIScope::generateRef();
friend DIScopeRef DIScope::getRef() const;
/// Val can be either a MDNode or a MDString, in the latter,
/// MDString specifies the type identifier.

View File

@ -322,7 +322,7 @@ DIDerivedType DIBuilder::createMemberPointerType(DIType PointeeTy,
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Offset
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Flags
PointeeTy,
Base.generateRef()
Base.getRef()
};
return DIDerivedType(MDNode::get(VMContext, Elts));
}
@ -375,7 +375,7 @@ DIDerivedType DIBuilder::createFriend(DIType Ty, DIType FriendTy) {
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_friend),
NULL,
Ty.generateRef(),
Ty.getRef(),
NULL, // Name
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
@ -396,7 +396,7 @@ DIDerivedType DIBuilder::createInheritance(
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_inheritance),
NULL,
Ty.generateRef(),
Ty.getRef(),
NULL, // Name
ConstantInt::get(Type::getInt32Ty(VMContext), 0), // Line
ConstantInt::get(Type::getInt64Ty(VMContext), 0), // Size
@ -417,7 +417,7 @@ DIDerivedType DIBuilder::createMemberType(
Value *Elts[] = {
GetTagConstant(VMContext, dwarf::DW_TAG_member),
File.getFileNode(),
DIScope(getNonCompileUnitScope(Scope)).generateRef(),
DIScope(getNonCompileUnitScope(Scope)).getRef(),
MDString::get(VMContext, Name),
ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
ConstantInt::get(Type::getInt64Ty(VMContext), SizeInBits),
@ -626,7 +626,7 @@ DICompositeType DIBuilder::createClassType(DIDescriptor Context, StringRef Name,
DerivedFrom,
Elements,
ConstantInt::get(Type::getInt32Ty(VMContext), 0),
VTableHolder.generateRef(),
VTableHolder.getRef(),
TemplateParams,
UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier)
};
@ -663,7 +663,7 @@ DICompositeType DIBuilder::createStructType(DIDescriptor Context,
DerivedFrom,
Elements,
ConstantInt::get(Type::getInt32Ty(VMContext), RunTimeLang),
VTableHolder.generateRef(),
VTableHolder.getRef(),
NULL,
UniqueIdentifier.empty() ? NULL : MDString::get(VMContext, UniqueIdentifier)
};
@ -1117,7 +1117,7 @@ DISubprogram DIBuilder::createMethod(DIDescriptor Context,
ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition),
ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK),
ConstantInt::get(Type::getInt32Ty(VMContext), VIndex),
VTableHolder.generateRef(),
VTableHolder.getRef(),
ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
ConstantInt::get(Type::getInt1Ty(VMContext), isOptimized),
Fn,

View File

@ -725,7 +725,7 @@ void DICompositeType::addMember(DIDescriptor D) {
/// Generate a reference to this DIType. Uses the type identifier instead
/// of the actual MDNode if possible, to help type uniquing.
DIScopeRef DIScope::generateRef() {
DIScopeRef DIScope::getRef() const {
if (!isCompositeType())
return DIScopeRef(*this);
DICompositeType DTy(DbgNode);
@ -737,7 +737,7 @@ DIScopeRef DIScope::generateRef() {
/// \brief Set the containing type.
void DICompositeType::setContainingType(DICompositeType ContainingType) {
TrackingVH<MDNode> N(*this);
N->replaceOperandWith(12, ContainingType.generateRef());
N->replaceOperandWith(12, ContainingType.getRef());
DbgNode = N;
}