[llvm] r191696 - Debug Info: constify and rename from generateRef to getRef.
Manman Ren
manman.ren at gmail.com
Mon Sep 30 12:42:10 PDT 2013
Author: mren
Date: Mon Sep 30 14:42:10 2013
New Revision: 191696
URL: http://llvm.org/viewvc/llvm-project?rev=191696&view=rev
Log:
Debug Info: constify and rename from generateRef to getRef.
No functionality change.
Modified:
llvm/trunk/include/llvm/DebugInfo.h
llvm/trunk/lib/IR/DIBuilder.cpp
llvm/trunk/lib/IR/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=191696&r1=191695&r2=191696&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Mon Sep 30 14:42:10 2013
@@ -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.
Modified: llvm/trunk/lib/IR/DIBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DIBuilder.cpp?rev=191696&r1=191695&r2=191696&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DIBuilder.cpp (original)
+++ llvm/trunk/lib/IR/DIBuilder.cpp Mon Sep 30 14:42:10 2013
@@ -322,7 +322,7 @@ DIDerivedType DIBuilder::createMemberPoi
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(DI
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::createInheritan
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::createMemberTyp
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::createClassTy
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::createStructT
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(DID
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,
Modified: llvm/trunk/lib/IR/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=191696&r1=191695&r2=191696&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfo.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfo.cpp Mon Sep 30 14:42:10 2013
@@ -725,7 +725,7 @@ void DICompositeType::addMember(DIDescri
/// 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;
}
More information about the llvm-commits
mailing list