DebugInfo: Sink DwarfDebug::ScopeVariables down into DwarfFile
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfCompileUnit.cpp
index f1ee52da8d480d3bc748ef585cd3c0ca70cfad0a..6fff9ecf29061d06ba3da08bf2ca527c437babb7 100644 (file)
@@ -530,7 +530,7 @@ DIE *DwarfCompileUnit::createScopeChildrenDIE(
     unsigned *ChildScopeCount) {
   DIE *ObjectPointer = nullptr;
 
-  for (DbgVariable *DV : DD->getScopeVariables().lookup(Scope))
+  for (DbgVariable *DV : DU->getScopeVariables().lookup(Scope))
     Children.push_back(constructVariableDIE(*DV, *Scope, ObjectPointer));
 
   unsigned ChildCountWithoutScopes = Children.size();