Adjust context for the global variables that are not at file scope, e.g.
void foo() { static int bar = 42; }
Here, foo's DIE is parent of bar's DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83344 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index f671ae3..2947d76 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -141,6 +141,10 @@
/// DbgScopeMap - Tracks the scopes in the current function.
DenseMap<MDNode *, DbgScope *> DbgScopeMap;
+ /// ScopedGVs - Tracks global variables that are not at file scope.
+ /// For example void f() { static int b = 42; }
+ SmallVector<WeakVH, 4> ScopedGVs;
+
typedef DenseMap<const MachineInstr *, SmallVector<DbgScope *, 2> >
InsnToDbgScopeMapTy;