IR: Drop the scope in DI template parameters

The scope/context is always the compile unit, which we replace with
`nullptr` anyway (via `getNonCompileUnitScope()`).  Drop it explicitly.

I noticed this field was always null while writing testcase upgrade
scripts to transition to the new hierarchy.  Seems wasteful to
transition it over if it's already out-of-use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-02-18 20:30:45 +00:00
parent f866bfc6aa
commit 87356edf74
3 changed files with 6 additions and 8 deletions

View File

@ -1117,11 +1117,9 @@ void DebugInfoFinder::processSubprogram(DISubprogram SP) {
DIDescriptor Element = TParams.getElement(I);
if (Element.isTemplateTypeParameter()) {
DITemplateTypeParameter TType(Element);
processScope(TType.getContext().resolve(TypeIdentifierMap));
processType(TType.getType().resolve(TypeIdentifierMap));
} else if (Element.isTemplateValueParameter()) {
DITemplateValueParameter TVal(Element);
processScope(TVal.getContext().resolve(TypeIdentifierMap));
processType(TVal.getType().resolve(TypeIdentifierMap));
}
}