summaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-09-09 19:03:51 +0000
committerManman Ren <manman.ren@gmail.com>2013-09-09 19:03:51 +0000
commitc573305bce147df68051a6dffef034c6210ab89c (patch)
treefb0ee7096fc8f96036ba913911eb5678746093aa /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent626a4b785b8ef14bbd4f763a01396df3c6a758f7 (diff)
downloadllvm-c573305bce147df68051a6dffef034c6210ab89c.tar.gz
llvm-c573305bce147df68051a6dffef034c6210ab89c.tar.bz2
llvm-c573305bce147df68051a6dffef034c6210ab89c.tar.xz
Debug Info: Rename DITypeRef to DIScopeRef.
A reference to a scope is more general than a reference to a type since DIType is a subclass of DIScope. A reference to a type can be either an identifier for the type or the DIType itself, while a reference to a scope can be either an identifier for the type (when the scope is indeed a type) or the DIScope itself. A reference to a type and a reference to a scope will be resolved in the same way. The only difference is in the verifier when a field is a reference to a type (i.e. the containing type field of a DICompositeType) or a field is a reference to a scope (i.e. the context field of a DIType). This is to get ready for switching DIType::getContext to return DIScopeRef instead of DIScope. Tighten up isTypeRef and isScopeRef to make sure the identifier is not empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 57ad489970..885d4ba5cd 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2633,7 +2633,7 @@ void DwarfDebug::emitDebugStrDWO() {
OffSec, StrSym);
}
-/// Find the MDNode for the given type reference.
-MDNode *DwarfDebug::resolve(DITypeRef TRef) const {
- return TRef.resolve(TypeIdentifierMap);
+/// Find the MDNode for the given scope reference.
+DIScope DwarfDebug::resolve(DIScopeRef SRef) const {
+ return SRef.resolve(TypeIdentifierMap);
}