aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-03-13 00:01:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-03-13 00:01:35 +0000
commitde3077ae6b5ad8e6f417a8f6aa0ca1ae980f6272 (patch)
tree54b7fc0b810ea78b5cd7c0a16bbaea5b1e7f1796 /lib/IR/DebugInfo.cpp
parentb79d25ca9c3b895d8fdc88c3acefec1202ca9da3 (diff)
Refactor filename/directory in DICompileUnit into a DIFile
This is the next step towards making the metadata for DIScopes have a common prefix rather than having to delegate based on their tag type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/DebugInfo.cpp')
-rw-r--r--lib/IR/DebugInfo.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 1d83c8ca49..6a15033b40 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -407,7 +407,7 @@ bool DICompileUnit::Verify() const {
if (N.empty())
return false;
// It is possible that directory and produce string is empty.
- return DbgNode->getNumOperands() == 14;
+ return DbgNode->getNumOperands() == 13;
}
/// Verify - Verify that an ObjC property is well formed.
@@ -687,38 +687,38 @@ StringRef DIScope::getDirectory() const {
}
DIArray DICompileUnit::getEnumTypes() const {
- if (!DbgNode || DbgNode->getNumOperands() < 14)
+ if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(9)))
+ if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(8)))
return DIArray(N);
return DIArray();
}
DIArray DICompileUnit::getRetainedTypes() const {
- if (!DbgNode || DbgNode->getNumOperands() < 14)
+ if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(10)))
+ if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(9)))
return DIArray(N);
return DIArray();
}
DIArray DICompileUnit::getSubprograms() const {
- if (!DbgNode || DbgNode->getNumOperands() < 14)
+ if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(11)))
+ if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(10)))
return DIArray(N);
return DIArray();
}
DIArray DICompileUnit::getGlobalVariables() const {
- if (!DbgNode || DbgNode->getNumOperands() < 14)
+ if (!DbgNode || DbgNode->getNumOperands() < 13)
return DIArray();
- if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(12)))
+ if (MDNode *N = dyn_cast_or_null<MDNode>(DbgNode->getOperand(11)))
return DIArray(N);
return DIArray();
}