diff options
author | Manman Ren <manman.ren@gmail.com> | 2013-09-10 18:30:07 +0000 |
---|---|---|
committer | Manman Ren <manman.ren@gmail.com> | 2013-09-10 18:30:07 +0000 |
commit | 2c46deb1d07f4588ee70059cdd4c7145f81bc8e8 (patch) | |
tree | f1811a6df419c56fb956f333553be760e10a82e8 /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 1039e106d095979b3707bb27cfa765cd2c0f3b54 (diff) | |
download | llvm-2c46deb1d07f4588ee70059cdd4c7145f81bc8e8.tar.gz llvm-2c46deb1d07f4588ee70059cdd4c7145f81bc8e8.tar.bz2 llvm-2c46deb1d07f4588ee70059cdd4c7145f81bc8e8.tar.xz |
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index e026c66813..6c13b9ec6f 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -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. |