mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
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:
@ -684,7 +684,10 @@ public:
|
||||
unsigned getDwarfVersion() const { return DwarfVersion; }
|
||||
|
||||
/// Find the MDNode for the given scope reference.
|
||||
DIScope resolve(DIScopeRef SRef) const;
|
||||
template <typename T>
|
||||
T resolve(DIRef<T> Ref) const {
|
||||
return Ref.resolve(TypeIdentifierMap);
|
||||
}
|
||||
|
||||
/// isSubprogramContext - Return true if Context is either a subprogram
|
||||
/// or another context nested inside a subprogram.
|
||||
|
Reference in New Issue
Block a user