summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 87cd3ef44d8..2b7d7f04083 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -224,8 +224,8 @@ void DebugInfoFinder::processScope(DIScope Scope) {
return;
if (DILexicalBlock LB = dyn_cast<MDLexicalBlockBase>(Scope)) {
processScope(LB.getContext());
- } else if (DINameSpace NS = dyn_cast<MDNamespace>(Scope)) {
- processScope(NS.getContext());
+ } else if (auto *NS = dyn_cast<MDNamespace>(Scope)) {
+ processScope(NS->getScope());
}
}
@@ -235,12 +235,10 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) {
processScope(SP.getContext().resolve(TypeIdentifierMap));
processType(SP.getType());
for (auto *Element : SP.getTemplateParams()) {
- if (DITemplateTypeParameter TType =
- dyn_cast<MDTemplateTypeParameter>(Element)) {
- processType(TType.getType().resolve(TypeIdentifierMap));
- } else if (DITemplateValueParameter TVal =
- dyn_cast<MDTemplateValueParameter>(Element)) {
- processType(TVal.getType().resolve(TypeIdentifierMap));
+ if (auto *TType = dyn_cast<MDTemplateTypeParameter>(Element)) {
+ processType(TType->getType().resolve(TypeIdentifierMap));
+ } else if (auto *TVal = dyn_cast<MDTemplateValueParameter>(Element)) {
+ processType(TVal->getType().resolve(TypeIdentifierMap));
}
}
}
OpenPOWER on IntegriCloud