summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit856191b0d1e426eb4272bc21e718c9db5478fde5 (patch)
tree86b50644f4a3fdab2ddc68ca644bfe9dcdc83da1 /llvm/lib/CodeGen
parent473c1988639f5ac9edec7a8b2434c1b01b9b9ae0 (diff)
downloadbcm5719-llvm-856191b0d1e426eb4272bc21e718c9db5478fde5.tar.gz
bcm5719-llvm-856191b0d1e426eb4272bc21e718c9db5478fde5.zip
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. llvm-svn: 190322
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 57ad489970d..885d4ba5cdc 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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);
}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 0258fdc3dbb..5ccaf0fa484 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -683,8 +683,8 @@ public:
/// Returns the Dwarf Version.
unsigned getDwarfVersion() const { return DwarfVersion; }
- /// Find the MDNode for the given type reference.
- MDNode *resolve(DITypeRef TRef) const;
+ /// Find the MDNode for the given scope reference.
+ DIScope resolve(DIScopeRef SRef) const;
};
} // End of namespace llvm
OpenPOWER on IntegriCloud