summaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-05-07 21:35:53 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-05-07 21:35:53 +0000
commit20d9e41ddb3f531267680819b5cac4cac1c6b231 (patch)
tree876162a4fa808369b673daf5be737c98476679bd /lib/IR/DebugInfo.cpp
parent8cb6b971601d42a27e40f0f1d4828671441989f5 (diff)
downloadllvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.gz
llvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.bz2
llvm-20d9e41ddb3f531267680819b5cac4cac1c6b231.tar.xz
Rename DIImportedModule to DIImportedEntity and allow imported declarations
DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181364 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index ec83dcaf52..3be5e0f849 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -65,7 +65,7 @@ bool DIDescriptor::Verify() const {
DIObjCProperty(DbgNode).Verify() ||
DITemplateTypeParameter(DbgNode).Verify() ||
DITemplateValueParameter(DbgNode).Verify() ||
- DIImportedModule(DbgNode).Verify());
+ DIImportedEntity(DbgNode).Verify());
}
static Value *getField(const MDNode *DbgNode, unsigned Elt) {
@@ -338,9 +338,11 @@ bool DIDescriptor::isObjCProperty() const {
return DbgNode && getTag() == dwarf::DW_TAG_APPLE_property;
}
-/// \brief Return true if the specified tag is DW_TAG_imported_module.
-bool DIDescriptor::isImportedModule() const {
- return DbgNode && getTag() == dwarf::DW_TAG_imported_module;
+/// \brief Return true if the specified tag is DW_TAG_imported_module or
+/// DW_TAG_imported_declaration.
+bool DIDescriptor::isImportedEntity() const {
+ return DbgNode && (getTag() == dwarf::DW_TAG_imported_module ||
+ getTag() == dwarf::DW_TAG_imported_declaration);
}
//===----------------------------------------------------------------------===//
@@ -588,8 +590,8 @@ bool DITemplateValueParameter::Verify() const {
}
/// \brief Verify that the imported module descriptor is well formed.
-bool DIImportedModule::Verify() const {
- return isImportedModule() && DbgNode->getNumOperands() == 4;
+bool DIImportedEntity::Verify() const {
+ return isImportedEntity() && DbgNode->getNumOperands() == 4;
}
/// getOriginalTypeSize - If this type is derived from a base type then
@@ -742,7 +744,7 @@ DIArray DICompileUnit::getGlobalVariables() const {
return DIArray();
}
-DIArray DICompileUnit::getImportedModules() const {
+DIArray DICompileUnit::getImportedEntities() const {
if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();