Debug Info: define a DIRef template.

Specialize the constructors for DIRef<DIScope> and DIRef<DIType> to make sure
the Value is indeed a scope ref and a type ref.

Use DIScopeRef for DIScope::getContext and DIType::getContext and use DITypeRef
for getContainingType and getClassType.

DIScope::generateRef now returns a DIScopeRef instead of a "Value *" for
readability and type safety.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190418 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manman Ren
2013-09-10 18:30:07 +00:00
parent 1039e106d0
commit 2c46deb1d0
4 changed files with 88 additions and 60 deletions

View File

@@ -2644,8 +2644,3 @@ void DwarfDebug::emitDebugStrDWO() {
InfoHolder.emitStrings(Asm->getObjFileLowering().getDwarfStrDWOSection(),
OffSec, StrSym);
}
/// Find the MDNode for the given scope reference.
DIScope DwarfDebug::resolve(DIScopeRef SRef) const {
return SRef.resolve(TypeIdentifierMap);
}