aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 03:40:37 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 03:40:37 +0000
commit537b4a8159fc07709b9cb4b8c4e65c6deae358b3 (patch)
treeaabc381361f0e80b53ac261c8aaa936a7d0782e1 /llvm/lib/IR/DebugInfo.cpp
parent68adb7da1abdca258ccfb87e929a42fd7e7af940 (diff)
downloadllvm-537b4a8159fc07709b9cb4b8c4e65c6deae358b3.zip
llvm-537b4a8159fc07709b9cb4b8c4e65c6deae358b3.tar.gz
llvm-537b4a8159fc07709b9cb4b8c4e65c6deae358b3.tar.bz2
DebugInfo: Gut DISubprogram and DILexicalBlock*
Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`. llvm-svn: 234850
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 2b7d7f0..3ffd1306 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -74,7 +74,7 @@ DISubprogram llvm::getDISubprogram(const Function *F) {
DebugLoc DLoc = Inst->getDebugLoc();
const MDNode *Scope = DLoc.getInlinedAtScope();
DISubprogram Subprogram = getDISubprogram(Scope);
- return Subprogram.describes(F) ? Subprogram : DISubprogram();
+ return Subprogram->describes(F) ? Subprogram : DISubprogram();
}
return DISubprogram();
@@ -222,8 +222,8 @@ void DebugInfoFinder::processScope(DIScope Scope) {
}
if (!addScope(Scope))
return;
- if (DILexicalBlock LB = dyn_cast<MDLexicalBlockBase>(Scope)) {
- processScope(LB.getContext());
+ if (auto *LB = dyn_cast<MDLexicalBlockBase>(Scope)) {
+ processScope(LB->getScope());
} else if (auto *NS = dyn_cast<MDNamespace>(Scope)) {
processScope(NS->getScope());
}
@@ -232,9 +232,9 @@ void DebugInfoFinder::processScope(DIScope Scope) {
void DebugInfoFinder::processSubprogram(DISubprogram SP) {
if (!addSubprogram(SP))
return;
- processScope(SP.getContext().resolve(TypeIdentifierMap));
- processType(SP.getType());
- for (auto *Element : SP.getTemplateParams()) {
+ processScope(SP->getScope().resolve(TypeIdentifierMap));
+ processType(SP->getType());
+ for (auto *Element : SP->getTemplateParams()) {
if (auto *TType = dyn_cast<MDTemplateTypeParameter>(Element)) {
processType(TType->getType().resolve(TypeIdentifierMap));
} else if (auto *TVal = dyn_cast<MDTemplateValueParameter>(Element)) {
@@ -434,7 +434,7 @@ llvm::makeSubprogramMap(const Module &M) {
for (MDNode *N : CU_Nodes->operands()) {
DICompileUnit CUNode = cast<MDCompileUnit>(N);
for (DISubprogram SP : CUNode->getSubprograms()) {
- if (Function *F = SP.getFunction())
+ if (Function *F = SP->getFunction())
R.insert(std::make_pair(F, SP));
}
}