RecordVariable is called each time a DECLARE node is encountered. For an inlined
function, this could be many, many times. We don't want to re-add variables to
that DIE for each time. We just want to add them once. Check to make sure that
we haven't added them already.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72047 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 18afbda..a997199 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -22,6 +22,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/FoldingSet.h"
+#include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/UniqueVector.h"
 #include <string>
@@ -163,6 +164,11 @@
   /// attribute.
   DenseMap<const GlobalVariable *, DbgScope *> AbstractInstanceRootMap;
 
+  /// InlinedParamMap - A map keeping track of which parameters are assigned to
+  /// which abstract instance.
+  DenseMap<const GlobalVariable *,
+    SmallSet<const GlobalVariable *, 32> > InlinedParamMap;
+
   /// AbstractInstanceRootList - List of abstract instance roots of inlined
   /// functions. These are subroutine entries that contain a DW_AT_inline
   /// attribute.
@@ -333,7 +339,8 @@
   /// CreateSubprogramDIE - Create new DIE using SP.
   DIE *CreateSubprogramDIE(CompileUnit *DW_Unit,
                            const DISubprogram &SP,
-                           bool IsConstructor = false);
+                           bool IsConstructor = false,
+                           bool IsInlined = false);
 
   /// FindCompileUnit - Get the compile unit for the given descriptor. 
   ///