DebugInfo: Remove 'inlinedAt:' field from MDLocalVariable
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 15 Apr 2015 22:29:27 +0000 (22:29 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 15 Apr 2015 22:29:27 +0000 (22:29 +0000)
Remove 'inlinedAt:' from MDLocalVariable.  Besides saving some memory
(variables with it seem to be single largest `Metadata` contributer to
memory usage right now in -g -flto builds), this stops optimization and
backend passes from having to change local variables.

The 'inlinedAt:' field was used by the backend in two ways:

 1. To tell the backend whether and into what a variable was inlined.
 2. To create a unique id for each inlined variable.

Instead, rely on the 'inlinedAt:' field of the intrinsic's `!dbg`
attachment, and change the DWARF backend to use a typedef called
`InlinedVariable` which is `std::pair<MDLocalVariable*, MDLocation*>`.
This `DebugLoc` is already passed reliably through the backend (as
verified by r234021).

This commit removes the check from r234021, but I added a new check
(that will survive) in r235048, and changed the `DIBuilder` API in
r235041 to require a `!dbg` attachment whose 'scope:` is in the same
`MDSubprogram` as the variable's.

If this breaks your out-of-tree testcases, perhaps the script I used
(mdlocalvariable-drop-inlinedat.sh) will help; I'll attach it to PR22778
in a moment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235050 91177308-0d34-0410-b5e6-96231b3b80d8

51 files changed:
docs/LangRef.rst
include/llvm/CodeGen/MachineModuleInfo.h
include/llvm/IR/DebugInfo.h
include/llvm/IR/DebugInfoMetadata.h
lib/AsmParser/LLParser.cpp
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp
lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfDebug.h
lib/CodeGen/LiveDebugVariables.cpp
lib/CodeGen/MachineInstr.cpp
lib/IR/AsmWriter.cpp
lib/IR/DebugInfo.cpp
lib/IR/DebugInfoMetadata.cpp
lib/IR/LLVMContextImpl.h
lib/IR/Verifier.cpp
lib/Transforms/Utils/InlineFunction.cpp
test/Assembler/mdlocalvariable.ll
test/CodeGen/ARM/debug-info-d16-reg.ll
test/CodeGen/ARM/debug-info-s16-reg.ll
test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll
test/CodeGen/X86/stack-protector-dbginfo.ll
test/DebugInfo/2010-05-03-OriginDIE.ll
test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll
test/DebugInfo/AArch64/cfi-eof-prologue.ll
test/DebugInfo/AArch64/frameindices.ll
test/DebugInfo/ARM/cfi-eof-prologue.ll
test/DebugInfo/Mips/InlinedFnLocalVar.ll
test/DebugInfo/PR20038.ll
test/DebugInfo/X86/InlinedFnLocalVar.ll
test/DebugInfo/X86/dbg-value-inlined-parameter.ll
test/DebugInfo/X86/debug-ranges-offset.ll
test/DebugInfo/X86/inline-member-function.ll
test/DebugInfo/X86/inline-seldag-test.ll
test/DebugInfo/X86/mi-print.ll
test/DebugInfo/X86/nodebug_with_debug_loc.ll
test/DebugInfo/X86/nophysreg.ll
test/DebugInfo/X86/recursive_inlining.ll
test/DebugInfo/cross-cu-inlining.ll
test/DebugInfo/inline-scopes.ll
test/DebugInfo/inlined-arguments.ll
test/DebugInfo/inlined-vars.ll
test/DebugInfo/missing-abstract-variable.ll
test/DebugInfo/namespace_inline_function_definition.ll
test/Transforms/Inline/alloca-dbgdeclare.ll
test/Transforms/Inline/inline_dbg_declare.ll
test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
unittests/IR/MetadataTest.cpp

index 0edd6a6c76989e934a5784e5b9bf2bef05f96801..c0caa091992418b700429eecd37ae73955266b45 100644 (file)
@@ -3235,21 +3235,15 @@ arguments (``DW_TAG_arg_variable``).  In the latter case, the ``arg:`` field
 specifies the argument position, and this variable will be included in the
 ``variables:`` field of its :ref:`MDSubprogram`.
 
 specifies the argument position, and this variable will be included in the
 ``variables:`` field of its :ref:`MDSubprogram`.
 
-If set, the ``inlinedAt:`` field points at an :ref:`MDLocation`, and the
-variable represents an inlined version of a variable (with all other fields
-duplicated from the non-inlined version).
-
 .. code-block:: llvm
 
     !0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 0,
                           scope: !3, file: !2, line: 7, type: !3,
 .. code-block:: llvm
 
     !0 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 0,
                           scope: !3, file: !2, line: 7, type: !3,
-                          flags: DIFlagArtificial, inlinedAt: !4)
+                          flags: DIFlagArtificial)
     !1 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1,
     !1 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1,
-                          scope: !4, file: !2, line: 7, type: !3,
-                          inlinedAt: !6)
+                          scope: !4, file: !2, line: 7, type: !3)
     !1 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "y",
     !1 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "y",
-                          scope: !5, file: !2, line: 7, type: !3,
-                          inlinedAt: !6)
+                          scope: !5, file: !2, line: 7, type: !3)
 
 MDExpression
 """"""""""""
 
 MDExpression
 """"""""""""
index f80c998a9f78742394e779c0d44e85b816363eff..3965b1dea702c1dfe314bab7e2d5ed64a90392ae 100644 (file)
@@ -184,12 +184,13 @@ public:
   static char ID; // Pass identification, replacement for typeid
 
   struct VariableDbgInfo {
   static char ID; // Pass identification, replacement for typeid
 
   struct VariableDbgInfo {
-    TrackingMDNodeRef Var;
-    TrackingMDNodeRef Expr;
+    const MDLocalVariable *Var;
+    const MDExpression *Expr;
     unsigned Slot;
     unsigned Slot;
-    DebugLoc Loc;
+    const MDLocation *Loc;
 
 
-    VariableDbgInfo(MDNode *Var, MDNode *Expr, unsigned Slot, DebugLoc Loc)
+    VariableDbgInfo(const MDLocalVariable *Var, const MDExpression *Expr,
+                    unsigned Slot, const MDLocation *Loc)
         : Var(Var), Expr(Expr), Slot(Slot), Loc(Loc) {}
   };
   typedef SmallVector<VariableDbgInfo, 4> VariableDbgInfoMapTy;
         : Var(Var), Expr(Expr), Slot(Slot), Loc(Loc) {}
   };
   typedef SmallVector<VariableDbgInfo, 4> VariableDbgInfoMapTy;
@@ -437,8 +438,8 @@ public:
 
   /// setVariableDbgInfo - Collect information used to emit debugging
   /// information of a variable.
 
   /// setVariableDbgInfo - Collect information used to emit debugging
   /// information of a variable.
-  void setVariableDbgInfo(MDNode *Var, MDNode *Expr, unsigned Slot,
-                          DebugLoc Loc) {
+  void setVariableDbgInfo(const MDLocalVariable *Var, const MDExpression *Expr,
+                          unsigned Slot, const MDLocation *Loc) {
     VariableDbgInfos.emplace_back(Var, Expr, Slot, Loc);
   }
 
     VariableDbgInfos.emplace_back(Var, Expr, Slot, Loc);
   }
 
index 46ebcb4b8df98ac4a531b9d508c1fc7c4e8b2738..cf7b5e0b8da9331bbf5aa69722c7c5e47e166259 100644 (file)
@@ -622,16 +622,6 @@ DISubprogram getDISubprogram(const Function *F);
 /// \brief Find underlying composite type.
 DICompositeType getDICompositeType(DIType T);
 
 /// \brief Find underlying composite type.
 DICompositeType getDICompositeType(DIType T);
 
-/// \brief Create a new inlined variable based on current variable.
-///
-/// @param DV            Current Variable.
-/// @param InlinedScope  Location at current variable is inlined.
-DIVariable createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
-                                 LLVMContext &VMContext);
-
-/// \brief Remove inlined scope from the variable.
-DIVariable cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext);
-
 /// \brief Generate map by visiting all retained types.
 DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
 
 /// \brief Generate map by visiting all retained types.
 DITypeIdentifierMap generateDITypeIdentifierMap(const NamedMDNode *CU_Nodes);
 
index ffaab7e2be4d9f33737e78568fc5566c43ad1aab..555a44f61aafd0f9b3d140e0840cfeb87d06d0a5 100644 (file)
@@ -1877,38 +1877,32 @@ class MDLocalVariable : public MDVariable {
   static MDLocalVariable *getImpl(LLVMContext &Context, unsigned Tag,
                                   MDScope *Scope, StringRef Name, MDFile *File,
                                   unsigned Line, MDTypeRef Type, unsigned Arg,
   static MDLocalVariable *getImpl(LLVMContext &Context, unsigned Tag,
                                   MDScope *Scope, StringRef Name, MDFile *File,
                                   unsigned Line, MDTypeRef Type, unsigned Arg,
-                                  unsigned Flags, MDLocation *InlinedAt,
-                                  StorageType Storage,
+                                  unsigned Flags, StorageType Storage,
                                   bool ShouldCreate = true) {
     return getImpl(Context, Tag, Scope, getCanonicalMDString(Context, Name),
                                   bool ShouldCreate = true) {
     return getImpl(Context, Tag, Scope, getCanonicalMDString(Context, Name),
-                   File, Line, Type, Arg, Flags, InlinedAt, Storage,
-                   ShouldCreate);
+                   File, Line, Type, Arg, Flags, Storage, ShouldCreate);
   }
   }
-  static MDLocalVariable *getImpl(LLVMContext &Context, unsigned Tag,
-                                  Metadata *Scope, MDString *Name,
-                                  Metadata *File, unsigned Line, Metadata *Type,
-                                  unsigned Arg, unsigned Flags,
-                                  Metadata *InlinedAt, StorageType Storage,
-                                  bool ShouldCreate = true);
+  static MDLocalVariable *
+  getImpl(LLVMContext &Context, unsigned Tag, Metadata *Scope, MDString *Name,
+          Metadata *File, unsigned Line, Metadata *Type, unsigned Arg,
+          unsigned Flags, StorageType Storage, bool ShouldCreate = true);
 
   TempMDLocalVariable cloneImpl() const {
     return getTemporary(getContext(), getTag(), getScope(), getName(),
 
   TempMDLocalVariable cloneImpl() const {
     return getTemporary(getContext(), getTag(), getScope(), getName(),
-                        getFile(), getLine(), getType(), getArg(), getFlags(),
-                        getInlinedAt());
+                        getFile(), getLine(), getType(), getArg(), getFlags());
   }
 
 public:
   DEFINE_MDNODE_GET(MDLocalVariable,
                     (unsigned Tag, MDLocalScope *Scope, StringRef Name,
                      MDFile *File, unsigned Line, MDTypeRef Type, unsigned Arg,
   }
 
 public:
   DEFINE_MDNODE_GET(MDLocalVariable,
                     (unsigned Tag, MDLocalScope *Scope, StringRef Name,
                      MDFile *File, unsigned Line, MDTypeRef Type, unsigned Arg,
-                     unsigned Flags, MDLocation *InlinedAt = nullptr),
-                    (Tag, Scope, Name, File, Line, Type, Arg, Flags, InlinedAt))
+                     unsigned Flags),
+                    (Tag, Scope, Name, File, Line, Type, Arg, Flags))
   DEFINE_MDNODE_GET(MDLocalVariable,
                     (unsigned Tag, Metadata *Scope, MDString *Name,
                      Metadata *File, unsigned Line, Metadata *Type,
   DEFINE_MDNODE_GET(MDLocalVariable,
                     (unsigned Tag, Metadata *Scope, MDString *Name,
                      Metadata *File, unsigned Line, Metadata *Type,
-                     unsigned Arg, unsigned Flags,
-                     Metadata *InlinedAt = nullptr),
-                    (Tag, Scope, Name, File, Line, Type, Arg, Flags, InlinedAt))
+                     unsigned Arg, unsigned Flags),
+                    (Tag, Scope, Name, File, Line, Type, Arg, Flags))
 
   TempMDLocalVariable clone() const { return cloneImpl(); }
 
 
   TempMDLocalVariable clone() const { return cloneImpl(); }
 
@@ -1921,11 +1915,6 @@ public:
 
   unsigned getArg() const { return Arg; }
   unsigned getFlags() const { return Flags; }
 
   unsigned getArg() const { return Arg; }
   unsigned getFlags() const { return Flags; }
-  MDLocation *getInlinedAt() const {
-    return cast_or_null<MDLocation>(getRawInlinedAt());
-  }
-
-  Metadata *getRawInlinedAt() const { return getOperand(4); }
 
   bool isArtificial() const { return getFlags() & FlagArtificial; }
   bool isObjectPointer() const { return getFlags() & FlagObjectPointer; }
 
   bool isArtificial() const { return getFlags() & FlagArtificial; }
   bool isObjectPointer() const { return getFlags() & FlagObjectPointer; }
@@ -1936,22 +1925,9 @@ public:
   /// inlined-at location as \c this.  (Otherwise, it's not a valid attachemnt
   /// to a \a DbgInfoIntrinsic.)
   bool isValidLocationForIntrinsic(const MDLocation *DL) const {
   /// inlined-at location as \c this.  (Otherwise, it's not a valid attachemnt
   /// to a \a DbgInfoIntrinsic.)
   bool isValidLocationForIntrinsic(const MDLocation *DL) const {
-    return DL && getInlinedAt() == DL->getInlinedAt() &&
-           getScope()->getSubprogram() == DL->getScope()->getSubprogram();
+    return DL && getScope()->getSubprogram() == DL->getScope()->getSubprogram();
   }
 
   }
 
-  /// \brief Get an inlined version of this variable.
-  ///
-  /// Returns a version of this with \a getAlinedAt() set to \c InlinedAt.
-  MDLocalVariable *withInline(MDLocation *InlinedAt) const {
-    if (InlinedAt == getInlinedAt())
-      return const_cast<MDLocalVariable *>(this);
-    auto Temp = clone();
-    Temp->replaceOperandWith(4, InlinedAt);
-    return replaceWithUniqued(std::move(Temp));
-  }
-  MDLocalVariable *withoutInline() const { return withInline(nullptr); }
-
   static bool classof(const Metadata *MD) {
     return MD->getMetadataID() == MDLocalVariableKind;
   }
   static bool classof(const Metadata *MD) {
     return MD->getMetadataID() == MDLocalVariableKind;
   }
index 1cd1c795eae8897f1bbc6b194181ec61af1337e8..64ed2a2b7e3e23b4573a90e7e88eab0562bedd4d 100644 (file)
@@ -3680,8 +3680,7 @@ bool LLParser::ParseMDGlobalVariable(MDNode *&Result, bool IsDistinct) {
 
 /// ParseMDLocalVariable:
 ///   ::= !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !0, name: "foo",
 
 /// ParseMDLocalVariable:
 ///   ::= !MDLocalVariable(tag: DW_TAG_arg_variable, scope: !0, name: "foo",
-///                        file: !1, line: 7, type: !2, arg: 2, flags: 7,
-///                        inlinedAt: !3)
+///                        file: !1, line: 7, type: !2, arg: 2, flags: 7)
 bool LLParser::ParseMDLocalVariable(MDNode *&Result, bool IsDistinct) {
 #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)                                    \
   REQUIRED(tag, DwarfTagField, );                                              \
 bool LLParser::ParseMDLocalVariable(MDNode *&Result, bool IsDistinct) {
 #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED)                                    \
   REQUIRED(tag, DwarfTagField, );                                              \
@@ -3691,14 +3690,13 @@ bool LLParser::ParseMDLocalVariable(MDNode *&Result, bool IsDistinct) {
   OPTIONAL(line, LineField, );                                                 \
   OPTIONAL(type, MDField, );                                                   \
   OPTIONAL(arg, MDUnsignedField, (0, UINT8_MAX));                              \
   OPTIONAL(line, LineField, );                                                 \
   OPTIONAL(type, MDField, );                                                   \
   OPTIONAL(arg, MDUnsignedField, (0, UINT8_MAX));                              \
-  OPTIONAL(flags, DIFlagField, );                                              \
-  OPTIONAL(inlinedAt, MDField, );
+  OPTIONAL(flags, DIFlagField, );
   PARSE_MD_FIELDS();
 #undef VISIT_MD_FIELDS
 
   PARSE_MD_FIELDS();
 #undef VISIT_MD_FIELDS
 
-  Result = GET_OR_DISTINCT(
-      MDLocalVariable, (Context, tag.Val, scope.Val, name.Val, file.Val,
-                        line.Val, type.Val, arg.Val, flags.Val, inlinedAt.Val));
+  Result = GET_OR_DISTINCT(MDLocalVariable,
+                           (Context, tag.Val, scope.Val, name.Val, file.Val,
+                            line.Val, type.Val, arg.Val, flags.Val));
   return false;
 }
 
   return false;
 }
 
index bd4d70b25aadcba4790cefcfcf9fa4337e40dc90..6caec344d1f2b190af154a6fa4cc1f00fc8b7b96 100644 (file)
@@ -1911,7 +1911,8 @@ std::error_code BitcodeReader::ParseMetadata() {
       break;
     }
     case bitc::METADATA_LOCAL_VAR: {
       break;
     }
     case bitc::METADATA_LOCAL_VAR: {
-      if (Record.size() != 10)
+      // 10th field is for the obseleted 'inlinedAt:' field.
+      if (Record.size() != 9 && Record.size() != 10)
         return Error("Invalid record");
 
       MDValueList.AssignValue(
         return Error("Invalid record");
 
       MDValueList.AssignValue(
@@ -1919,7 +1920,7 @@ std::error_code BitcodeReader::ParseMetadata() {
                           (Context, Record[1], getMDOrNull(Record[2]),
                            getMDString(Record[3]), getMDOrNull(Record[4]),
                            Record[5], getMDOrNull(Record[6]), Record[7],
                           (Context, Record[1], getMDOrNull(Record[2]),
                            getMDString(Record[3]), getMDOrNull(Record[4]),
                            Record[5], getMDOrNull(Record[6]), Record[7],
-                           Record[8], getMDOrNull(Record[9]))),
+                           Record[8])),
           NextMDValueNo++);
       break;
     }
           NextMDValueNo++);
       break;
     }
index e209b03b97a802a8572d4edf6a4e381e02fbfe57..743ffe3cb1fd35cd3be94d3c38575f04e4edc7cb 100644 (file)
@@ -1085,7 +1085,6 @@ static void WriteMDLocalVariable(const MDLocalVariable *N,
   Record.push_back(VE.getMetadataOrNullID(N->getType()));
   Record.push_back(N->getArg());
   Record.push_back(N->getFlags());
   Record.push_back(VE.getMetadataOrNullID(N->getType()));
   Record.push_back(N->getArg());
   Record.push_back(N->getFlags());
-  Record.push_back(VE.getMetadataOrNullID(N->getInlinedAt()));
 
   Stream.EmitRecord(bitc::METADATA_LOCAL_VAR, Record, Abbrev);
   Record.clear();
 
   Stream.EmitRecord(bitc::METADATA_LOCAL_VAR, Record, Abbrev);
   Record.clear();
index 24cfb361a9f65e564a5ca6b3dd9f9f9a1c291486..af8827cec290b99ba0049f3456f7bf04c14b61b7 100644 (file)
@@ -33,7 +33,7 @@ static unsigned isDescribedByReg(const MachineInstr &MI) {
   return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : 0;
 }
 
   return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : 0;
 }
 
-void DbgValueHistoryMap::startInstrRange(const MDNode *Var,
+void DbgValueHistoryMap::startInstrRange(InlinedVariable Var,
                                          const MachineInstr &MI) {
   // Instruction range should start with a DBG_VALUE instruction for the
   // variable.
                                          const MachineInstr &MI) {
   // Instruction range should start with a DBG_VALUE instruction for the
   // variable.
@@ -48,7 +48,7 @@ void DbgValueHistoryMap::startInstrRange(const MDNode *Var,
   Ranges.push_back(std::make_pair(&MI, nullptr));
 }
 
   Ranges.push_back(std::make_pair(&MI, nullptr));
 }
 
-void DbgValueHistoryMap::endInstrRange(const MDNode *Var,
+void DbgValueHistoryMap::endInstrRange(InlinedVariable Var,
                                        const MachineInstr &MI) {
   auto &Ranges = VarInstrRanges[Var];
   // Verify that the current instruction range is not yet closed.
                                        const MachineInstr &MI) {
   auto &Ranges = VarInstrRanges[Var];
   // Verify that the current instruction range is not yet closed.
@@ -59,7 +59,7 @@ void DbgValueHistoryMap::endInstrRange(const MDNode *Var,
   Ranges.back().second = &MI;
 }
 
   Ranges.back().second = &MI;
 }
 
-unsigned DbgValueHistoryMap::getRegisterForVar(const MDNode *Var) const {
+unsigned DbgValueHistoryMap::getRegisterForVar(InlinedVariable Var) const {
   const auto &I = VarInstrRanges.find(Var);
   if (I == VarInstrRanges.end())
     return 0;
   const auto &I = VarInstrRanges.find(Var);
   if (I == VarInstrRanges.end())
     return 0;
@@ -71,12 +71,13 @@ unsigned DbgValueHistoryMap::getRegisterForVar(const MDNode *Var) const {
 
 namespace {
 // Maps physreg numbers to the variables they describe.
 
 namespace {
 // Maps physreg numbers to the variables they describe.
-typedef std::map<unsigned, SmallVector<const MDNode *, 1>> RegDescribedVarsMap;
+typedef DbgValueHistoryMap::InlinedVariable InlinedVariable;
+typedef std::map<unsigned, SmallVector<InlinedVariable, 1>> RegDescribedVarsMap;
 }
 
 // \brief Claim that @Var is not described by @RegNo anymore.
 }
 
 // \brief Claim that @Var is not described by @RegNo anymore.
-static void dropRegDescribedVar(RegDescribedVarsMap &RegVars,
-                                unsigned RegNo, const MDNode *Var) {
+static void dropRegDescribedVar(RegDescribedVarsMap &RegVars, unsigned RegNo,
+                                InlinedVariable Var) {
   const auto &I = RegVars.find(RegNo);
   assert(RegNo != 0U && I != RegVars.end());
   auto &VarSet = I->second;
   const auto &I = RegVars.find(RegNo);
   assert(RegNo != 0U && I != RegVars.end());
   auto &VarSet = I->second;
@@ -89,8 +90,8 @@ static void dropRegDescribedVar(RegDescribedVarsMap &RegVars,
 }
 
 // \brief Claim that @Var is now described by @RegNo.
 }
 
 // \brief Claim that @Var is now described by @RegNo.
-static void addRegDescribedVar(RegDescribedVarsMap &RegVars,
-                               unsigned RegNo, const MDNode *Var) {
+static void addRegDescribedVar(RegDescribedVarsMap &RegVars, unsigned RegNo,
+                               InlinedVariable Var) {
   assert(RegNo != 0U);
   auto &VarSet = RegVars[RegNo];
   assert(std::find(VarSet.begin(), VarSet.end(), Var) == VarSet.end());
   assert(RegNo != 0U);
   auto &VarSet = RegVars[RegNo];
   assert(std::find(VarSet.begin(), VarSet.end(), Var) == VarSet.end());
@@ -203,9 +204,13 @@ void llvm::calculateDbgValueHistory(const MachineFunction *MF,
       // Use the base variable (without any DW_OP_piece expressions)
       // as index into History. The full variables including the
       // piece expressions are attached to the MI.
       // Use the base variable (without any DW_OP_piece expressions)
       // as index into History. The full variables including the
       // piece expressions are attached to the MI.
-      DIVariable Var = MI.getDebugVariable();
-      assert(Var->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
+      MDLocalVariable *RawVar = MI.getDebugVariable();
+      assert(RawVar->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
              "Expected inlined-at fields to agree");
              "Expected inlined-at fields to agree");
+      MDLocation *IA = nullptr;
+      if (MDLocation *Loc = MI.getDebugLoc())
+        IA = Loc->getInlinedAt();
+      InlinedVariable Var(RawVar, IA);
 
       if (unsigned PrevReg = Result.getRegisterForVar(Var))
         dropRegDescribedVar(RegVars, PrevReg, Var);
 
       if (unsigned PrevReg = Result.getRegisterForVar(Var))
         dropRegDescribedVar(RegVars, PrevReg, Var);
index 4b6200717d26721845675f9b4b01b1b7a4617daa..c25aaffd2d1c8fa80a491fffbfeef789d714f65f 100644 (file)
@@ -17,7 +17,8 @@ namespace llvm {
 
 class MachineFunction;
 class MachineInstr;
 
 class MachineFunction;
 class MachineInstr;
-class MDNode;
+class MDLocalVariable;
+class MDLocation;
 class TargetRegisterInfo;
 
 // For each user variable, keep a list of instruction ranges where this variable
 class TargetRegisterInfo;
 
 // For each user variable, keep a list of instruction ranges where this variable
@@ -31,16 +32,19 @@ class DbgValueHistoryMap {
 public:
   typedef std::pair<const MachineInstr *, const MachineInstr *> InstrRange;
   typedef SmallVector<InstrRange, 4> InstrRanges;
 public:
   typedef std::pair<const MachineInstr *, const MachineInstr *> InstrRange;
   typedef SmallVector<InstrRange, 4> InstrRanges;
-  typedef MapVector<const MDNode *, InstrRanges> InstrRangesMap;
+  typedef std::pair<const MDLocalVariable *, const MDLocation *>
+      InlinedVariable;
+  typedef MapVector<InlinedVariable, InstrRanges> InstrRangesMap;
+
 private:
   InstrRangesMap VarInstrRanges;
 
 public:
 private:
   InstrRangesMap VarInstrRanges;
 
 public:
-  void startInstrRange(const MDNode *Var, const MachineInstr &MI);
-  void endInstrRange(const MDNode *Var, const MachineInstr &MI);
+  void startInstrRange(InlinedVariable Var, const MachineInstr &MI);
+  void endInstrRange(InlinedVariable Var, const MachineInstr &MI);
   // Returns register currently describing @Var. If @Var is currently
   // unaccessible or is not described by a register, returns 0.
   // Returns register currently describing @Var. If @Var is currently
   // unaccessible or is not described by a register, returns 0.
-  unsigned getRegisterForVar(const MDNode *Var) const;
+  unsigned getRegisterForVar(InlinedVariable Var) const;
 
   bool empty() const { return VarInstrRanges.empty(); }
   void clear() { VarInstrRanges.clear(); }
 
   bool empty() const { return VarInstrRanges.empty(); }
   void clear() { VarInstrRanges.clear(); }
index d3097a16cc5ebeb896371130071b8179f2c47ace..ee52a6eb1ad98f6589f45a9f3fe3d4ea5588b927 100644 (file)
@@ -689,7 +689,7 @@ void DwarfCompileUnit::collectDeadVariables(DISubprogram SP) {
     SPDIE = getDIE(SP);
   assert(SPDIE);
   for (DIVariable DV : Variables) {
     SPDIE = getDIE(SP);
   assert(SPDIE);
   for (DIVariable DV : Variables) {
-    DbgVariable NewVar(DV, DIExpression(), DD);
+    DbgVariable NewVar(DV, nullptr, DIExpression(), DD);
     auto VariableDie = constructVariableDIE(NewVar);
     applyVariableAttributes(NewVar, *VariableDie);
     SPDIE->addChild(std::move(VariableDie));
     auto VariableDie = constructVariableDIE(NewVar);
     applyVariableAttributes(NewVar, *VariableDie);
     SPDIE->addChild(std::move(VariableDie));
index 527c1af88f8ed4c90d3ded3575f41d7c97b44673..631d13167bd953d2bedac061be61752c10b617c7 100644 (file)
@@ -489,7 +489,8 @@ void DwarfDebug::finishVariableDefinitions() {
     // DIE::getUnit isn't simple - it walks parent pointers, etc.
     DwarfCompileUnit *Unit = lookupUnit(VariableDie->getUnit());
     assert(Unit);
     // DIE::getUnit isn't simple - it walks parent pointers, etc.
     DwarfCompileUnit *Unit = lookupUnit(VariableDie->getUnit());
     assert(Unit);
-    DbgVariable *AbsVar = getExistingAbstractVariable(Var->getVariable());
+    DbgVariable *AbsVar = getExistingAbstractVariable(
+        InlinedVariable(Var->getVariable(), Var->getInlinedAt()));
     if (AbsVar && AbsVar->getDIE()) {
       Unit->addDIEEntry(*VariableDie, dwarf::DW_AT_abstract_origin,
                         *AbsVar->getDIE());
     if (AbsVar && AbsVar->getDIE()) {
       Unit->addDIEEntry(*VariableDie, dwarf::DW_AT_abstract_origin,
                         *AbsVar->getDIE());
@@ -660,48 +661,43 @@ void DwarfDebug::endModule() {
 }
 
 // Find abstract variable, if any, associated with Var.
 }
 
 // Find abstract variable, if any, associated with Var.
-DbgVariable *DwarfDebug::getExistingAbstractVariable(const DIVariable &DV,
+DbgVariable *DwarfDebug::getExistingAbstractVariable(InlinedVariable IV,
                                                      DIVariable &Cleansed) {
                                                      DIVariable &Cleansed) {
-  LLVMContext &Ctx = DV->getContext();
   // More then one inlined variable corresponds to one abstract variable.
   // More then one inlined variable corresponds to one abstract variable.
-  // FIXME: This duplication of variables when inlining should probably be
-  // removed. It's done to allow each DIVariable to describe its location
-  // because the DebugLoc on the dbg.value/declare isn't accurate. We should
-  // make it accurate then remove this duplication/cleansing stuff.
-  Cleansed = cleanseInlinedVariable(DV, Ctx);
+  Cleansed = IV.first;
   auto I = AbstractVariables.find(Cleansed);
   if (I != AbstractVariables.end())
     return I->second.get();
   return nullptr;
 }
 
   auto I = AbstractVariables.find(Cleansed);
   if (I != AbstractVariables.end())
     return I->second.get();
   return nullptr;
 }
 
-DbgVariable *DwarfDebug::getExistingAbstractVariable(const DIVariable &DV) {
+DbgVariable *DwarfDebug::getExistingAbstractVariable(InlinedVariable IV) {
   DIVariable Cleansed;
   DIVariable Cleansed;
-  return getExistingAbstractVariable(DV, Cleansed);
+  return getExistingAbstractVariable(IV, Cleansed);
 }
 
 void DwarfDebug::createAbstractVariable(const DIVariable &Var,
                                         LexicalScope *Scope) {
 }
 
 void DwarfDebug::createAbstractVariable(const DIVariable &Var,
                                         LexicalScope *Scope) {
-  auto AbsDbgVariable = make_unique<DbgVariable>(Var, DIExpression(), this);
+  auto AbsDbgVariable =
+      make_unique<DbgVariable>(Var, nullptr, DIExpression(), this);
   InfoHolder.addScopeVariable(Scope, AbsDbgVariable.get());
   AbstractVariables[Var] = std::move(AbsDbgVariable);
 }
 
   InfoHolder.addScopeVariable(Scope, AbsDbgVariable.get());
   AbstractVariables[Var] = std::move(AbsDbgVariable);
 }
 
-void DwarfDebug::ensureAbstractVariableIsCreated(const DIVariable &DV,
+void DwarfDebug::ensureAbstractVariableIsCreated(InlinedVariable IV,
                                                  const MDNode *ScopeNode) {
                                                  const MDNode *ScopeNode) {
-  DIVariable Cleansed = DV;
-  if (getExistingAbstractVariable(DV, Cleansed))
+  DIVariable Cleansed;
+  if (getExistingAbstractVariable(IV, Cleansed))
     return;
 
   createAbstractVariable(Cleansed, LScopes.getOrCreateAbstractScope(
                                        cast<MDLocalScope>(ScopeNode)));
 }
 
     return;
 
   createAbstractVariable(Cleansed, LScopes.getOrCreateAbstractScope(
                                        cast<MDLocalScope>(ScopeNode)));
 }
 
-void
-DwarfDebug::ensureAbstractVariableIsCreatedIfScoped(const DIVariable &DV,
-                                                    const MDNode *ScopeNode) {
-  DIVariable Cleansed = DV;
-  if (getExistingAbstractVariable(DV, Cleansed))
+void DwarfDebug::ensureAbstractVariableIsCreatedIfScoped(
+    InlinedVariable IV, const MDNode *ScopeNode) {
+  DIVariable Cleansed;
+  if (getExistingAbstractVariable(IV, Cleansed))
     return;
 
   if (LexicalScope *Scope =
     return;
 
   if (LexicalScope *Scope =
@@ -711,11 +707,12 @@ DwarfDebug::ensureAbstractVariableIsCreatedIfScoped(const DIVariable &DV,
 
 // Collect variable information from side table maintained by MMI.
 void DwarfDebug::collectVariableInfoFromMMITable(
 
 // Collect variable information from side table maintained by MMI.
 void DwarfDebug::collectVariableInfoFromMMITable(
-    SmallPtrSetImpl<const MDNode *> &Processed) {
+    DenseSet<InlinedVariable> &Processed) {
   for (const auto &VI : MMI->getVariableDbgInfo()) {
     if (!VI.Var)
       continue;
   for (const auto &VI : MMI->getVariableDbgInfo()) {
     if (!VI.Var)
       continue;
-    Processed.insert(VI.Var);
+    InlinedVariable Var(VI.Var, VI.Loc ? VI.Loc->getInlinedAt() : nullptr);
+    Processed.insert(Var);
     LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
 
     // If variable scope is not found then skip this variable.
     LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
 
     // If variable scope is not found then skip this variable.
@@ -726,8 +723,9 @@ void DwarfDebug::collectVariableInfoFromMMITable(
     assert(DV->isValidLocationForIntrinsic(VI.Loc) &&
            "Expected inlined-at fields to agree");
     DIExpression Expr = cast_or_null<MDExpression>(VI.Expr);
     assert(DV->isValidLocationForIntrinsic(VI.Loc) &&
            "Expected inlined-at fields to agree");
     DIExpression Expr = cast_or_null<MDExpression>(VI.Expr);
-    ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());
-    auto RegVar = make_unique<DbgVariable>(DV, Expr, this, VI.Slot);
+    ensureAbstractVariableIsCreatedIfScoped(Var, Scope->getScopeNode());
+    auto RegVar =
+        make_unique<DbgVariable>(Var.first, Var.second, Expr, this, VI.Slot);
     if (InfoHolder.addScopeVariable(Scope, RegVar.get()))
       ConcreteVariables.push_back(std::move(RegVar));
   }
     if (InfoHolder.addScopeVariable(Scope, RegVar.get()))
       ConcreteVariables.push_back(std::move(RegVar));
   }
@@ -877,35 +875,34 @@ DwarfDebug::buildLocationList(SmallVectorImpl<DebugLocEntry> &DebugLoc,
 
 
 // Find variables for each lexical scope.
 
 
 // Find variables for each lexical scope.
-void
-DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
-                                SmallPtrSetImpl<const MDNode *> &Processed) {
+void DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
+                                     DenseSet<InlinedVariable> &Processed) {
   // Grab the variable info that was squirreled away in the MMI side-table.
   collectVariableInfoFromMMITable(Processed);
 
   for (const auto &I : DbgValues) {
   // Grab the variable info that was squirreled away in the MMI side-table.
   collectVariableInfoFromMMITable(Processed);
 
   for (const auto &I : DbgValues) {
-    DIVariable DV = cast<MDLocalVariable>(I.first);
-    if (Processed.count(DV))
+    InlinedVariable IV = I.first;
+    if (Processed.count(IV))
       continue;
 
       continue;
 
-    // Instruction ranges, specifying where DV is accessible.
+    // Instruction ranges, specifying where IV is accessible.
     const auto &Ranges = I.second;
     if (Ranges.empty())
       continue;
 
     LexicalScope *Scope = nullptr;
     const auto &Ranges = I.second;
     if (Ranges.empty())
       continue;
 
     LexicalScope *Scope = nullptr;
-    if (MDLocation *IA = DV->getInlinedAt())
-      Scope = LScopes.findInlinedScope(DV->getScope(), IA);
+    if (const MDLocation *IA = IV.second)
+      Scope = LScopes.findInlinedScope(IV.first->getScope(), IA);
     else
     else
-      Scope = LScopes.findLexicalScope(DV->getScope());
+      Scope = LScopes.findLexicalScope(IV.first->getScope());
     // If variable scope is not found then skip this variable.
     if (!Scope)
       continue;
 
     // If variable scope is not found then skip this variable.
     if (!Scope)
       continue;
 
-    Processed.insert(DV);
+    Processed.insert(IV);
     const MachineInstr *MInsn = Ranges.front().first;
     assert(MInsn->isDebugValue() && "History must begin with debug value");
     const MachineInstr *MInsn = Ranges.front().first;
     assert(MInsn->isDebugValue() && "History must begin with debug value");
-    ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());
+    ensureAbstractVariableIsCreatedIfScoped(IV, Scope->getScopeNode());
     ConcreteVariables.push_back(make_unique<DbgVariable>(MInsn, this));
     DbgVariable *RegVar = ConcreteVariables.back().get();
     InfoHolder.addScopeVariable(Scope, RegVar);
     ConcreteVariables.push_back(make_unique<DbgVariable>(MInsn, this));
     DbgVariable *RegVar = ConcreteVariables.back().get();
     InfoHolder.addScopeVariable(Scope, RegVar);
@@ -931,12 +928,14 @@ DwarfDebug::collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
 
   // Collect info for variables that were optimized out.
   for (DIVariable DV : SP->getVariables()) {
 
   // Collect info for variables that were optimized out.
   for (DIVariable DV : SP->getVariables()) {
-    if (!Processed.insert(DV).second)
+    if (!Processed.insert(InlinedVariable(DV, nullptr)).second)
       continue;
     if (LexicalScope *Scope = LScopes.findLexicalScope(DV->getScope())) {
       continue;
     if (LexicalScope *Scope = LScopes.findLexicalScope(DV->getScope())) {
-      ensureAbstractVariableIsCreatedIfScoped(DV, Scope->getScopeNode());
+      ensureAbstractVariableIsCreatedIfScoped(InlinedVariable(DV, nullptr),
+                                              Scope->getScopeNode());
       DIExpression NoExpr;
       DIExpression NoExpr;
-      ConcreteVariables.push_back(make_unique<DbgVariable>(DV, NoExpr, this));
+      ConcreteVariables.push_back(
+          make_unique<DbgVariable>(DV, nullptr, NoExpr, this));
       InfoHolder.addScopeVariable(Scope, ConcreteVariables.back().get());
     }
   }
       InfoHolder.addScopeVariable(Scope, ConcreteVariables.back().get());
     }
   }
@@ -1188,7 +1187,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
   DISubprogram SP = cast<MDSubprogram>(FnScope->getScopeNode());
   DwarfCompileUnit &TheCU = *SPMap.lookup(SP);
 
   DISubprogram SP = cast<MDSubprogram>(FnScope->getScopeNode());
   DwarfCompileUnit &TheCU = *SPMap.lookup(SP);
 
-  SmallPtrSet<const MDNode *, 16> ProcessedVars;
+  DenseSet<InlinedVariable> ProcessedVars;
   collectVariableInfo(TheCU, SP, ProcessedVars);
 
   // Add the range of this function to the list of ranges for the CU.
   collectVariableInfo(TheCU, SP, ProcessedVars);
 
   // Add the range of this function to the list of ranges for the CU.
@@ -1218,9 +1217,10 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
     DISubprogram SP = cast<MDSubprogram>(AScope->getScopeNode());
     // Collect info for variables that were optimized out.
     for (DIVariable DV : SP->getVariables()) {
     DISubprogram SP = cast<MDSubprogram>(AScope->getScopeNode());
     // Collect info for variables that were optimized out.
     for (DIVariable DV : SP->getVariables()) {
-      if (!ProcessedVars.insert(DV).second)
+      if (!ProcessedVars.insert(InlinedVariable(DV, nullptr)).second)
         continue;
         continue;
-      ensureAbstractVariableIsCreated(DV, DV->getScope());
+      ensureAbstractVariableIsCreated(InlinedVariable(DV, nullptr),
+                                      DV->getScope());
       assert(LScopes.getAbstractScopesList().size() == NumAbstractScopes
              && "ensureAbstractVariableIsCreated inserted abstract scopes");
     }
       assert(LScopes.getAbstractScopesList().size() == NumAbstractScopes
              && "ensureAbstractVariableIsCreated inserted abstract scopes");
     }
index 1ec5cf1b309ff8787025855832041c635d2b7e34..c1ef08fd0363b4262479bb8f4f125318277ab4ca 100644 (file)
@@ -21,6 +21,7 @@
 #include "DwarfAccelTable.h"
 #include "DwarfFile.h"
 #include "llvm/ADT/DenseMap.h"
 #include "DwarfAccelTable.h"
 #include "DwarfFile.h"
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/FoldingSet.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
@@ -74,7 +75,8 @@ public:
 /// - Variables that are described by multiple MMI table entries have multiple
 ///   expressions and frame indices.
 class DbgVariable {
 /// - Variables that are described by multiple MMI table entries have multiple
 ///   expressions and frame indices.
 class DbgVariable {
-  DIVariable Var;             /// Variable Descriptor.
+  DIVariable Var;                    /// Variable Descriptor.
+  DILocation IA;                     /// Inlined at location.
   SmallVector<DIExpression, 1> Expr; /// Complex address location expression.
   DIE *TheDIE;                /// Variable DIE.
   unsigned DotDebugLocOffset; /// Offset in DotDebugLocEntries.
   SmallVector<DIExpression, 1> Expr; /// Complex address location expression.
   DIE *TheDIE;                /// Variable DIE.
   unsigned DotDebugLocOffset; /// Offset in DotDebugLocEntries.
@@ -84,9 +86,10 @@ class DbgVariable {
 
 public:
   /// Construct a DbgVariable from a DIVariable.
 
 public:
   /// Construct a DbgVariable from a DIVariable.
-    DbgVariable(DIVariable V, DIExpression E, DwarfDebug *DD, int FI = ~0)
-    : Var(V), Expr(1, E), TheDIE(nullptr), DotDebugLocOffset(~0U),
-      MInsn(nullptr), DD(DD) {
+  DbgVariable(DIVariable V, DILocation IA, DIExpression E, DwarfDebug *DD,
+              int FI = ~0)
+      : Var(V), IA(IA), Expr(1, E), TheDIE(nullptr), DotDebugLocOffset(~0U),
+        MInsn(nullptr), DD(DD) {
     FrameIndex.push_back(FI);
     assert(!E || E->isValid());
   }
     FrameIndex.push_back(FI);
     assert(!E || E->isValid());
   }
@@ -95,13 +98,18 @@ public:
   /// AbstractVar may be NULL.
   DbgVariable(const MachineInstr *DbgValue, DwarfDebug *DD)
       : Var(DbgValue->getDebugVariable()),
   /// AbstractVar may be NULL.
   DbgVariable(const MachineInstr *DbgValue, DwarfDebug *DD)
       : Var(DbgValue->getDebugVariable()),
+        IA(DbgValue->getDebugLoc() ? DbgValue->getDebugLoc()->getInlinedAt()
+                                   : nullptr),
         Expr(1, DbgValue->getDebugExpression()), TheDIE(nullptr),
         DotDebugLocOffset(~0U), MInsn(DbgValue), DD(DD) {
     FrameIndex.push_back(~0);
         Expr(1, DbgValue->getDebugExpression()), TheDIE(nullptr),
         DotDebugLocOffset(~0U), MInsn(DbgValue), DD(DD) {
     FrameIndex.push_back(~0);
+    if (MDLocation *Loc = DbgValue->getDebugLoc())
+      IA = Loc->getInlinedAt();
   }
 
   // Accessors.
   DIVariable getVariable() const { return Var; }
   }
 
   // Accessors.
   DIVariable getVariable() const { return Var; }
+  DILocation getInlinedAt() const { return IA; }
   const ArrayRef<DIExpression> getExpression() const { return Expr; }
   void setDIE(DIE &D) { TheDIE = &D; }
   DIE *getDIE() const { return TheDIE; }
   const ArrayRef<DIExpression> getExpression() const { return Expr; }
   void setDIE(DIE &D) { TheDIE = &D; }
   DIE *getDIE() const { return TheDIE; }
@@ -115,6 +123,7 @@ public:
     assert(  DotDebugLocOffset == ~0U &&   !MInsn && "not an MMI entry");
     assert(V.DotDebugLocOffset == ~0U && !V.MInsn && "not an MMI entry");
     assert(V.Var == Var && "conflicting DIVariable");
     assert(  DotDebugLocOffset == ~0U &&   !MInsn && "not an MMI entry");
     assert(V.DotDebugLocOffset == ~0U && !V.MInsn && "not an MMI entry");
     assert(V.Var == Var && "conflicting DIVariable");
+    assert(V.IA == IA && "conflicting inlined-at location");
 
     if (V.getFrameIndex().back() != ~0) {
       auto E = V.getExpression();
 
     if (V.getFrameIndex().back() != ~0) {
       auto E = V.getExpression();
@@ -323,14 +332,16 @@ class DwarfDebug : public AsmPrinterHandler {
     return InfoHolder.getUnits();
   }
 
     return InfoHolder.getUnits();
   }
 
+  typedef DbgValueHistoryMap::InlinedVariable InlinedVariable;
+
   /// \brief Find abstract variable associated with Var.
   /// \brief Find abstract variable associated with Var.
-  DbgVariable *getExistingAbstractVariable(const DIVariable &DV,
+  DbgVariable *getExistingAbstractVariable(InlinedVariable IV,
                                            DIVariable &Cleansed);
                                            DIVariable &Cleansed);
-  DbgVariable *getExistingAbstractVariable(const DIVariable &DV);
+  DbgVariable *getExistingAbstractVariable(InlinedVariable IV);
   void createAbstractVariable(const DIVariable &DV, LexicalScope *Scope);
   void createAbstractVariable(const DIVariable &DV, LexicalScope *Scope);
-  void ensureAbstractVariableIsCreated(const DIVariable &Var,
+  void ensureAbstractVariableIsCreated(InlinedVariable Var,
                                        const MDNode *Scope);
                                        const MDNode *Scope);
-  void ensureAbstractVariableIsCreatedIfScoped(const DIVariable &Var,
+  void ensureAbstractVariableIsCreatedIfScoped(InlinedVariable Var,
                                                const MDNode *Scope);
 
   /// \brief Construct a DIE for this abstract scope.
                                                const MDNode *Scope);
 
   /// \brief Construct a DIE for this abstract scope.
@@ -460,7 +471,7 @@ class DwarfDebug : public AsmPrinterHandler {
 
   /// \brief Populate LexicalScope entries with variables' info.
   void collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
 
   /// \brief Populate LexicalScope entries with variables' info.
   void collectVariableInfo(DwarfCompileUnit &TheCU, DISubprogram SP,
-                           SmallPtrSetImpl<const MDNode *> &ProcessedVars);
+                           DenseSet<InlinedVariable> &ProcessedVars);
 
   /// \brief Build the location list for all DBG_VALUEs in the
   /// function that describe the same variable.
 
   /// \brief Build the location list for all DBG_VALUEs in the
   /// function that describe the same variable.
@@ -469,7 +480,7 @@ class DwarfDebug : public AsmPrinterHandler {
 
   /// \brief Collect variable information from the side table maintained
   /// by MMI.
 
   /// \brief Collect variable information from the side table maintained
   /// by MMI.
-  void collectVariableInfoFromMMITable(SmallPtrSetImpl<const MDNode *> &P);
+  void collectVariableInfoFromMMITable(DenseSet<InlinedVariable> &P);
 
   /// \brief Ensure that a label will be emitted before MI.
   void requestLabelBeforeInsn(const MachineInstr *MI) {
 
   /// \brief Ensure that a label will be emitted before MI.
   void requestLabelBeforeInsn(const MachineInstr *MI) {
index 2e8615219c8a131ebaf154aa7fc81eb2387ebcb7..a07a7c9e5677187dcb1b1c77e4a6ffec907741a6 100644 (file)
@@ -378,12 +378,13 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS,
   CommentOS << " ]";
 }
 
   CommentOS << " ]";
 }
 
-static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V) {
+static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V,
+                              const MDLocation *DL) {
   const LLVMContext &Ctx = V->getContext();
   StringRef Res = V->getName();
   if (!Res.empty())
     OS << Res << "," << V->getLine();
   const LLVMContext &Ctx = V->getContext();
   StringRef Res = V->getName();
   if (!Res.empty())
     OS << Res << "," << V->getLine();
-  if (auto *InlinedAt = V->getInlinedAt()) {
+  if (auto *InlinedAt = DL->getInlinedAt()) {
     if (DebugLoc InlinedAtDL = InlinedAt) {
       OS << " @[";
       printDebugLoc(InlinedAtDL, OS, Ctx);
     if (DebugLoc InlinedAtDL = InlinedAt) {
       OS << " @[";
       printDebugLoc(InlinedAtDL, OS, Ctx);
@@ -395,7 +396,7 @@ static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V) {
 void UserValue::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
   DIVariable DV = cast<MDLocalVariable>(Variable);
   OS << "!\"";
 void UserValue::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
   DIVariable DV = cast<MDLocalVariable>(Variable);
   OS << "!\"";
-  printExtendedName(OS, DV);
+  printExtendedName(OS, DV, dl);
 
   OS << "\"\t";
   if (offset)
 
   OS << "\"\t";
   if (offset)
index f244e6b19e379478dfe576414d774ac299716c7e..d15411026cbd9d0baa4bacb5701574475ec75775 100644 (file)
@@ -1712,7 +1712,7 @@ void MachineInstr::print(raw_ostream &OS, bool SkipOpers) const {
     if (!HaveSemi) OS << ";";
     DIVariable DV = cast<MDLocalVariable>(getOperand(e - 2).getMetadata());
     OS << " line no:" <<  DV->getLine();
     if (!HaveSemi) OS << ";";
     DIVariable DV = cast<MDLocalVariable>(getOperand(e - 2).getMetadata());
     OS << " line no:" <<  DV->getLine();
-    if (auto *InlinedAt = DV->getInlinedAt()) {
+    if (auto *InlinedAt = debugLoc->getInlinedAt()) {
       DebugLoc InlinedAtDL(InlinedAt);
       if (InlinedAtDL && MF) {
         OS << " inlined @[ ";
       DebugLoc InlinedAtDL(InlinedAt);
       if (InlinedAtDL && MF) {
         OS << " inlined @[ ";
index a2eb545f8b1952044cf8e75084e5cb1e375c54bf..d314727c4ea30ea046c0ac1dc09ab50ea6e03eb0 100644 (file)
@@ -1745,7 +1745,6 @@ static void writeMDLocalVariable(raw_ostream &Out, const MDLocalVariable *N,
   Printer.printInt("line", N->getLine());
   Printer.printMetadata("type", N->getRawType());
   Printer.printDIFlags("flags", N->getFlags());
   Printer.printInt("line", N->getLine());
   Printer.printMetadata("type", N->getRawType());
   Printer.printDIFlags("flags", N->getFlags());
-  Printer.printMetadata("inlinedAt", N->getRawInlinedAt());
   Out << ")";
 }
 
   Out << ")";
 }
 
index ca7a4f4801bddb4985b78f23e2536298be9f2749..3e34572c04439f3e2485b48508385e2cebb21049 100644 (file)
@@ -35,16 +35,6 @@ using namespace llvm::dwarf;
 
 DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
 
 
 DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
 
-DIVariable llvm::createInlinedVariable(MDNode *DV, MDNode *InlinedScope,
-                                       LLVMContext &VMContext) {
-  return cast<MDLocalVariable>(DV)
-      ->withInline(cast_or_null<MDLocation>(InlinedScope));
-}
-
-DIVariable llvm::cleanseInlinedVariable(MDNode *DV, LLVMContext &VMContext) {
-  return cast<MDLocalVariable>(DV)->withoutInline();
-}
-
 DISubprogram llvm::getDISubprogram(const MDNode *Scope) {
   if (auto *LocalScope = dyn_cast_or_null<MDLocalScope>(Scope))
     return LocalScope->getSubprogram();
 DISubprogram llvm::getDISubprogram(const MDNode *Scope) {
   if (auto *LocalScope = dyn_cast_or_null<MDLocalScope>(Scope))
     return LocalScope->getSubprogram();
index 1ad09dafa4ebe26366d28ed2ed30c1924fc876ac..f6f2ff2d20c61c2bbf40938225470f9debc94f48 100644 (file)
@@ -450,10 +450,12 @@ MDGlobalVariable::getImpl(LLVMContext &Context, Metadata *Scope, MDString *Name,
                        Ops);
 }
 
                        Ops);
 }
 
-MDLocalVariable *MDLocalVariable::getImpl(
-    LLVMContext &Context, unsigned Tag, Metadata *Scope, MDString *Name,
-    Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags,
-    Metadata *InlinedAt, StorageType Storage, bool ShouldCreate) {
+MDLocalVariable *MDLocalVariable::getImpl(LLVMContext &Context, unsigned Tag,
+                                          Metadata *Scope, MDString *Name,
+                                          Metadata *File, unsigned Line,
+                                          Metadata *Type, unsigned Arg,
+                                          unsigned Flags, StorageType Storage,
+                                          bool ShouldCreate) {
   // Truncate Arg to 8 bits.
   //
   // FIXME: This is gross (and should be changed to an assert or removed), but
   // Truncate Arg to 8 bits.
   //
   // FIXME: This is gross (and should be changed to an assert or removed), but
@@ -463,8 +465,8 @@ MDLocalVariable *MDLocalVariable::getImpl(
   assert(Scope && "Expected scope");
   assert(isCanonical(Name) && "Expected canonical MDString");
   DEFINE_GETIMPL_LOOKUP(MDLocalVariable, (Tag, Scope, getString(Name), File,
   assert(Scope && "Expected scope");
   assert(isCanonical(Name) && "Expected canonical MDString");
   DEFINE_GETIMPL_LOOKUP(MDLocalVariable, (Tag, Scope, getString(Name), File,
-                                          Line, Type, Arg, Flags, InlinedAt));
-  Metadata *Ops[] = {Scope, Name, File, Type, InlinedAt};
+                                          Line, Type, Arg, Flags));
+  Metadata *Ops[] = {Scope, Name, File, Type};
   DEFINE_GETIMPL_STORE(MDLocalVariable, (Tag, Line, Arg, Flags), Ops);
 }
 
   DEFINE_GETIMPL_STORE(MDLocalVariable, (Tag, Line, Arg, Flags), Ops);
 }
 
index 6f9a3e1f6396903d71d0c8f0bdeaa9d1febcdaf1..c096a831b20a458a93ab2e11cea1e0b94b7d74e6 100644 (file)
@@ -736,29 +736,24 @@ template <> struct MDNodeKeyImpl<MDLocalVariable> {
   Metadata *Type;
   unsigned Arg;
   unsigned Flags;
   Metadata *Type;
   unsigned Arg;
   unsigned Flags;
-  Metadata *InlinedAt;
 
   MDNodeKeyImpl(unsigned Tag, Metadata *Scope, StringRef Name, Metadata *File,
 
   MDNodeKeyImpl(unsigned Tag, Metadata *Scope, StringRef Name, Metadata *File,
-                unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags,
-                Metadata *InlinedAt)
+                unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags)
       : Tag(Tag), Scope(Scope), Name(Name), File(File), Line(Line), Type(Type),
       : Tag(Tag), Scope(Scope), Name(Name), File(File), Line(Line), Type(Type),
-        Arg(Arg), Flags(Flags), InlinedAt(InlinedAt) {}
+        Arg(Arg), Flags(Flags) {}
   MDNodeKeyImpl(const MDLocalVariable *N)
       : Tag(N->getTag()), Scope(N->getRawScope()), Name(N->getName()),
         File(N->getRawFile()), Line(N->getLine()), Type(N->getRawType()),
   MDNodeKeyImpl(const MDLocalVariable *N)
       : Tag(N->getTag()), Scope(N->getRawScope()), Name(N->getName()),
         File(N->getRawFile()), Line(N->getLine()), Type(N->getRawType()),
-        Arg(N->getArg()), Flags(N->getFlags()),
-        InlinedAt(N->getRawInlinedAt()) {}
+        Arg(N->getArg()), Flags(N->getFlags()) {}
 
   bool isKeyOf(const MDLocalVariable *RHS) const {
     return Tag == RHS->getTag() && Scope == RHS->getRawScope() &&
            Name == RHS->getName() && File == RHS->getRawFile() &&
            Line == RHS->getLine() && Type == RHS->getRawType() &&
 
   bool isKeyOf(const MDLocalVariable *RHS) const {
     return Tag == RHS->getTag() && Scope == RHS->getRawScope() &&
            Name == RHS->getName() && File == RHS->getRawFile() &&
            Line == RHS->getLine() && Type == RHS->getRawType() &&
-           Arg == RHS->getArg() && Flags == RHS->getFlags() &&
-           InlinedAt == RHS->getRawInlinedAt();
+           Arg == RHS->getArg() && Flags == RHS->getFlags();
   }
   unsigned getHashValue() const {
   }
   unsigned getHashValue() const {
-    return hash_combine(Tag, Scope, Name, File, Line, Type, Arg, Flags,
-                        InlinedAt);
+    return hash_combine(Tag, Scope, Name, File, Line, Type, Arg, Flags);
   }
 };
 
   }
 };
 
index 3df885ac8f9ffdbb386b708641d86e8be16a60ce..fba78e92a093bd5ca3dafc73ce407e377cc60007 100644 (file)
@@ -1075,9 +1075,6 @@ void Verifier::visitMDLocalVariable(const MDLocalVariable &N) {
          "invalid tag", &N);
   Assert(N.getRawScope() && isa<MDLocalScope>(N.getRawScope()),
          "local variable requires a valid scope", &N, N.getRawScope());
          "invalid tag", &N);
   Assert(N.getRawScope() && isa<MDLocalScope>(N.getRawScope()),
          "local variable requires a valid scope", &N, N.getRawScope());
-  if (auto *IA = N.getRawInlinedAt())
-    Assert(isa<MDLocation>(IA), "local variable requires a valid scope", &N,
-           IA);
 }
 
 void Verifier::visitMDExpression(const MDExpression &N) {
 }
 
 void Verifier::visitMDExpression(const MDExpression &N) {
@@ -3401,17 +3398,12 @@ void Verifier::visitDbgIntrinsic(StringRef Kind, DbgIntrinsicTy &DII) {
   BasicBlock *BB = DII.getParent();
   Function *F = BB ? BB->getParent() : nullptr;
 
   BasicBlock *BB = DII.getParent();
   Function *F = BB ? BB->getParent() : nullptr;
 
-  // The inlined-at attachments for variables and !dbg attachments must agree.
+  // The scopes for variables and !dbg attachments must agree.
   MDLocalVariable *Var = DII.getVariable();
   MDLocalVariable *Var = DII.getVariable();
-  MDLocation *VarIA = Var->getInlinedAt();
   MDLocation *Loc = DII.getDebugLoc();
   Assert(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment",
          &DII, BB, F);
 
   MDLocation *Loc = DII.getDebugLoc();
   Assert(Loc, "llvm.dbg." + Kind + " intrinsic requires a !dbg attachment",
          &DII, BB, F);
 
-  MDLocation *LocIA = Loc->getInlinedAt();
-  Assert(VarIA == LocIA, "mismatched variable and !dbg inlined-at", &DII, BB, F,
-         Var, VarIA, Loc, LocIA);
-
   MDSubprogram *VarSP = getSubprogram(Var->getRawScope());
   MDSubprogram *LocSP = getSubprogram(Loc->getRawScope());
   if (!VarSP || !LocSP)
   MDSubprogram *VarSP = getSubprogram(Var->getRawScope());
   MDSubprogram *LocSP = getSubprogram(Loc->getRawScope());
   if (!VarSP || !LocSP)
index 7683b6bacf199e8d67572ab28d2cb9cac553deec..a08ffbeb329568ed02de48daaccff28ccd7de7c4 100644 (file)
@@ -904,19 +904,6 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI,
         BI->setDebugLoc(TheCallDL);
       } else {
         BI->setDebugLoc(updateInlinedAtInfo(DL, InlinedAtNode, BI->getContext(), IANodes));
         BI->setDebugLoc(TheCallDL);
       } else {
         BI->setDebugLoc(updateInlinedAtInfo(DL, InlinedAtNode, BI->getContext(), IANodes));
-        if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(BI)) {
-          LLVMContext &Ctx = BI->getContext();
-          MDNode *InlinedAt = BI->getDebugLoc().getInlinedAt();
-          DVI->setOperand(2, MetadataAsValue::get(
-                                 Ctx, createInlinedVariable(DVI->getVariable(),
-                                                            InlinedAt, Ctx)));
-        } else if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(BI)) {
-          LLVMContext &Ctx = BI->getContext();
-          MDNode *InlinedAt = BI->getDebugLoc().getInlinedAt();
-          DDI->setOperand(1, MetadataAsValue::get(
-                                 Ctx, createInlinedVariable(DDI->getVariable(),
-                                                            InlinedAt, Ctx)));
-        }
       }
     }
   }
       }
     }
   }
index e9ab8f80101a2c95bb2c45aaf5ac7fd03c8306c6..2c0b35a3a57fd0d355e25b2dd2b612e4a33b82f3 100644 (file)
 !3 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !4 = !MDLocation(scope: !0)
 
 !3 = !MDBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !4 = !MDLocation(scope: !0)
 
-; CHECK: !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3, scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
-; CHECK: !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
+; CHECK: !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3, scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial)
+; CHECK: !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0, file: !2, line: 7, type: !3, flags: DIFlagArtificial)
 !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3,
                       scope: !0, file: !2, line: 7, type: !3,
 !5 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "foo", arg: 3,
                       scope: !0, file: !2, line: 7, type: !3,
-                      flags: DIFlagArtificial, inlinedAt: !4)
+                      flags: DIFlagArtificial)
 !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0,
 !6 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "foo", scope: !0,
-                      file: !2, line: 7, type: !3, flags: DIFlagArtificial, inlinedAt: !4)
+                      file: !2, line: 7, type: !3, flags: DIFlagArtificial)
 
 ; CHECK: !7 = !MDLocalVariable(tag: DW_TAG_arg_variable, arg: 0, scope: !0)
 ; CHECK: !8 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: !0)
 
 ; CHECK: !7 = !MDLocalVariable(tag: DW_TAG_arg_variable, arg: 0, scope: !0)
 ; CHECK: !8 = !MDLocalVariable(tag: DW_TAG_auto_variable, scope: !0)
index 7c4fb38106aaeaed03039a47e43161e9291afd11..ca44e67f9ccf13d60d14509737fb9be3428372d2 100644 (file)
@@ -82,9 +82,9 @@ declare i32 @puts(i8* nocapture) nounwind
 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7)
 !21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !9, file: !1, type: !8)
 
 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7)
 !21 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !9, file: !1, type: !8)
 
-!49 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !9, file: !1, type: !6, inlinedAt: !37)
-!50 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7, inlinedAt: !37)
-!51 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 2, scope: !9, file: !1, type: !8, inlinedAt: !37)
+!49 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !9, file: !1, type: !6)
+!50 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !9, file: !1, type: !7)
+!51 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 2, scope: !9, file: !1, type: !8)
 
 !22 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 17, arg: 0, scope: !10, file: !1, type: !5)
 !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 17, arg: 0, scope: !10, file: !1, type: !13)
 
 !22 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argc", line: 17, arg: 0, scope: !10, file: !1, type: !5)
 !23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argv", line: 17, arg: 0, scope: !10, file: !1, type: !13)
index a0567fae744e18652dd8d1154c103b998a82967f..5b7fcd6ec2303b49e2b2b6ef624bf626223c17bc 100644 (file)
@@ -80,9 +80,9 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
 !12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)
 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)
 
 !12 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)
 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "unsigned char", size: 8, align: 8, encoding: DW_ATE_unsigned_char)
 
-!58 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9, inlinedAt: !40)
-!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11, inlinedAt: !40)
-!62 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13, inlinedAt: !40)
+!58 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 4, arg: 1, scope: !0, file: !1, type: !9)
+!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 4, arg: 2, scope: !0, file: !1, type: !11)
+!62 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "c", line: 4, arg: 3, scope: !0, file: !1, type: !13)
 
 !14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 11, arg: 1, scope: !6, file: !1, type: !9)
 !15 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 11, arg: 2, scope: !6, file: !1, type: !11)
 
 !14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "ptr", line: 11, arg: 1, scope: !6, file: !1, type: !9)
 !15 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "val", line: 11, arg: 2, scope: !6, file: !1, type: !11)
index fe502bb142a39ca5eeded1be49ebf42bd58f9d2b..c5085a2f2a573aaac5d4a4eaf7ff8fc3c7090a77 100644 (file)
@@ -169,36 +169,36 @@ attributes #2 = { nounwind readnone }
 !53 = distinct !MDLexicalBlock(line: 14, column: 0, file: !1, scope: !51)
 !54 = !MDLocation(line: 16, scope: !53)
 !55 = !MDLocation(line: 17, scope: !24)
 !53 = distinct !MDLexicalBlock(line: 14, column: 0, file: !1, scope: !51)
 !54 = !MDLocation(line: 16, scope: !53)
 !55 = !MDLocation(line: 17, scope: !24)
-!56 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !40, type: !38, inlinedAt: !55)
+!56 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !40, type: !38)
 !57 = !MDLocation(line: 0, scope: !40, inlinedAt: !55)
 !58 = !{i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)}
 !57 = !MDLocation(line: 0, scope: !40, inlinedAt: !55)
 !58 = !{i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)}
-!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 5, arg: 2, scope: !40, file: !25, type: !15, inlinedAt: !55)
+!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 5, arg: 2, scope: !40, file: !25, type: !15)
 !60 = !MDLocation(line: 5, scope: !40, inlinedAt: !55)
 !61 = !MDLocation(line: 5, scope: !62, inlinedAt: !55)
 !62 = distinct !MDLexicalBlock(line: 5, column: 0, file: !1, scope: !40)
 !63 = !MDLocation(line: 18, scope: !24)
 !60 = !MDLocation(line: 5, scope: !40, inlinedAt: !55)
 !61 = !MDLocation(line: 5, scope: !62, inlinedAt: !55)
 !62 = distinct !MDLexicalBlock(line: 5, column: 0, file: !1, scope: !40)
 !63 = !MDLocation(line: 18, scope: !24)
-!64 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !40, type: !38, inlinedAt: !63)
+!64 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !40, type: !38)
 !65 = !MDLocation(line: 0, scope: !40, inlinedAt: !63)
 !65 = !MDLocation(line: 0, scope: !40, inlinedAt: !63)
-!66 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 5, arg: 2, scope: !40, file: !25, type: !15, inlinedAt: !63)
+!66 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 5, arg: 2, scope: !40, file: !25, type: !15)
 !67 = !MDLocation(line: 5, scope: !40, inlinedAt: !63)
 !68 = !MDLocation(line: 5, scope: !62, inlinedAt: !63)
 !69 = !MDLocation(line: 20, scope: !70)
 !70 = distinct !MDLexicalBlock(line: 20, column: 0, file: !1, scope: !24)
 !67 = !MDLocation(line: 5, scope: !40, inlinedAt: !63)
 !68 = !MDLocation(line: 5, scope: !62, inlinedAt: !63)
 !69 = !MDLocation(line: 20, scope: !70)
 !70 = distinct !MDLexicalBlock(line: 20, column: 0, file: !1, scope: !24)
-!71 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38, inlinedAt: !72)
+!71 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38)
 !72 = !MDLocation(line: 21, scope: !70)
 !73 = !MDLocation(line: 0, scope: !35, inlinedAt: !72)
 !74 = !{i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str1, i64 0, i64 0)}
 !72 = !MDLocation(line: 21, scope: !70)
 !73 = !MDLocation(line: 0, scope: !35, inlinedAt: !72)
 !74 = !{i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str1, i64 0, i64 0)}
-!75 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15, inlinedAt: !72)
+!75 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15)
 !76 = !MDLocation(line: 6, scope: !35, inlinedAt: !72)
 !76 = !MDLocation(line: 6, scope: !35, inlinedAt: !72)
-!77 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38, inlinedAt: !78)
+!77 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38)
 !78 = !MDLocation(line: 23, scope: !70)
 !79 = !MDLocation(line: 0, scope: !35, inlinedAt: !78)
 !80 = !{i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str2, i64 0, i64 0)}
 !78 = !MDLocation(line: 23, scope: !70)
 !79 = !MDLocation(line: 0, scope: !35, inlinedAt: !78)
 !80 = !{i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str2, i64 0, i64 0)}
-!81 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15, inlinedAt: !78)
+!81 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15)
 !82 = !MDLocation(line: 6, scope: !35, inlinedAt: !78)
 !82 = !MDLocation(line: 6, scope: !35, inlinedAt: !78)
-!83 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38, inlinedAt: !84)
+!83 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !35, type: !38)
 !84 = !MDLocation(line: 24, scope: !24)
 !85 = !MDLocation(line: 0, scope: !35, inlinedAt: !84)
 !84 = !MDLocation(line: 24, scope: !24)
 !85 = !MDLocation(line: 0, scope: !35, inlinedAt: !84)
-!86 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15, inlinedAt: !84)
+!86 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "value", line: 6, arg: 2, scope: !35, file: !25, type: !15)
 !87 = !MDLocation(line: 6, scope: !35, inlinedAt: !84)
 !88 = !MDLocation(line: 25, scope: !24)
 !87 = !MDLocation(line: 6, scope: !35, inlinedAt: !84)
 !88 = !MDLocation(line: 25, scope: !24)
index f19437e13a4a65efa5b64047f38add91ac2e5ecb..6275c8d65f45ee08a4169f75bdc9a60946ff7a32 100644 (file)
@@ -48,7 +48,7 @@ attributes #0 = { sspreq }
 !20 = !{}
 !21 = !{i32 2, !"Dwarf Version", i32 2}
 !22 = !{i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0)}
 !20 = !{}
 !21 = !{i32 2, !"Dwarf Version", i32 2}
 !22 = !{i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0)}
-!23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p2", line: 12, arg: 2, scope: !24, file: !10, type: !32, inlinedAt: !38)
+!23 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p2", line: 12, arg: 2, scope: !24, file: !10, type: !32)
 !24 = !MDSubprogram(name: "min<unsigned long long>", linkageName: "_ZN3__13minIyEERKT_S3_RS1_", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !1, scope: !25, type: !27, templateParams: !33, variables: !35)
 !25 = !MDNamespace(name: "__1", line: 1, file: !26, scope: null)
 !26 = !MDFile(filename: "main.cpp", directory: "/Users/matt/ryan_bug")
 !24 = !MDSubprogram(name: "min<unsigned long long>", linkageName: "_ZN3__13minIyEERKT_S3_RS1_", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 12, file: !1, scope: !25, type: !27, templateParams: !33, variables: !35)
 !25 = !MDNamespace(name: "__1", line: 1, file: !26, scope: null)
 !26 = !MDFile(filename: "main.cpp", directory: "/Users/matt/ryan_bug")
@@ -85,7 +85,7 @@ attributes #0 = { sspreq }
 !58 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p3", line: 8, arg: 3, scope: !41, file: !10, type: !44)
 !59 = !MDLocation(line: 13, scope: !24, inlinedAt: !38)
 !63 = !{i32 undef}
 !58 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p3", line: 8, arg: 3, scope: !41, file: !10, type: !44)
 !59 = !MDLocation(line: 13, scope: !24, inlinedAt: !38)
 !63 = !{i32 undef}
-!64 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 1, arg: 2, scope: !65, file: !10, type: !50, inlinedAt: !40)
+!64 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 1, arg: 2, scope: !65, file: !10, type: !50)
 !65 = !MDSubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !25, type: !47, declaration: !46, variables: !66)
 !66 = !{!67, !69, !70}
 !67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !65, type: !68)
 !65 = !MDSubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 2, file: !1, scope: !25, type: !47, declaration: !46, variables: !66)
 !66 = !{!67, !69, !70}
 !67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !65, type: !68)
index 57b4d2155a681ddfa0ceb2b37ff2d300aa6537f8..914e78134f6484d33411785ee0be148ae6fd988b 100644 (file)
@@ -58,7 +58,7 @@ declare void @uuid_LtoB(i8*, i8*)
 !5 = !MDSubroutineType(types: !6)
 !6 = !{null}
 !7 = !MDLocation(line: 810, scope: !1)
 !5 = !MDSubroutineType(types: !6)
 !6 = !{null}
 !7 = !MDLocation(line: 810, scope: !1)
-!8 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 0, scope: !9, file: !10, type: !11, inlinedAt: !7)
+!8 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "data", line: 201, arg: 0, scope: !9, file: !10, type: !11)
 !9 = !MDSubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5)
 !10 = !MDFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc")
 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13)
 !9 = !MDSubprogram(name: "_OSSwapInt64", linkageName: "_OSSwapInt64", line: 202, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, file: !10, scope: null, type: !5)
 !10 = !MDFile(filename: "OSByteOrder.h", directory: "/usr/include/libkern/ppc")
 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "uint64_t", line: 59, file: !36, scope: !3, baseType: !13)
index 542df3e441528b689cd1ce138b5dce20dc8ddc9c..ae05e4787452f1e2fe8f1643fdcdd45327ce8bf4 100644 (file)
@@ -37,8 +37,8 @@ entry:
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
-!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
-!60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
+!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
+!60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
index a20e2c55bb22499f297bdd9da4d0b4dcff10235d..ab4ef4e5ca3abaa948741fbc423b0755a656c2da 100644 (file)
@@ -106,7 +106,7 @@ attributes #3 = { nounwind }
 !42 = !{!"vtable pointer", !43, i64 0}
 !43 = !{!"Simple C/C++ TBAA"}
 !44 = !MDLocation(line: 0, scope: !32)
 !42 = !{!"vtable pointer", !43, i64 0}
 !43 = !{!"Simple C/C++ TBAA"}
 !44 = !MDLocation(line: 0, scope: !32)
-!45 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31, inlinedAt: !46)
+!45 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
 !46 = !MDLocation(line: 9, scope: !32)
 !47 = !MDLocation(line: 0, scope: !28, inlinedAt: !46)
 !48 = !MDLocation(line: 9, scope: !28, inlinedAt: !46)
 !46 = !MDLocation(line: 9, scope: !32)
 !47 = !MDLocation(line: 0, scope: !28, inlinedAt: !46)
 !48 = !MDLocation(line: 9, scope: !28, inlinedAt: !46)
index 71ca4b81169cebb9ee285fb1dbe9c5b113c9926d..51424a0bdd4032b411e4753856732dcc098c7a63 100644 (file)
@@ -234,7 +234,7 @@ attributes #5 = { builtin }
 !71 = !MDLocation(line: 15, column: 3, scope: !25, inlinedAt: !66)
 !72 = !MDLocation(line: 16, column: 1, scope: !25, inlinedAt: !66)
 !73 = !MDLocation(line: 17, column: 27, scope: !31)
 !71 = !MDLocation(line: 15, column: 3, scope: !25, inlinedAt: !66)
 !72 = !MDLocation(line: 16, column: 1, scope: !25, inlinedAt: !66)
 !73 = !MDLocation(line: 17, column: 27, scope: !31)
-!74 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !"_ZTS1A", inlinedAt: !75)
+!74 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 17, arg: 1, scope: !31, file: !26, type: !"_ZTS1A")
 !75 = distinct !MDLocation(line: 22, column: 3, scope: !34)
 !76 = !MDExpression(DW_OP_bit_piece, 8, 120)
 !77 = !MDLocation(line: 17, column: 12, scope: !31, inlinedAt: !75)
 !75 = distinct !MDLocation(line: 22, column: 3, scope: !34)
 !76 = !MDExpression(DW_OP_bit_piece, 8, 120)
 !77 = !MDLocation(line: 17, column: 12, scope: !31, inlinedAt: !75)
index d32e8f75a18c62b17ee6303065a74907197822c2..fd91f9211a0f671935870807221b16fe4d247b12 100644 (file)
@@ -109,7 +109,7 @@ attributes #3 = { nounwind }
 !44 = !{!"vtable pointer", !45, i64 0}
 !45 = !{!"Simple C/C++ TBAA"}
 !46 = !MDLocation(line: 0, scope: !32)
 !44 = !{!"vtable pointer", !45, i64 0}
 !45 = !{!"Simple C/C++ TBAA"}
 !46 = !MDLocation(line: 0, scope: !32)
-!47 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31, inlinedAt: !48)
+!47 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !28, type: !31)
 !48 = !MDLocation(line: 9, scope: !32)
 !49 = !MDLocation(line: 0, scope: !28, inlinedAt: !48)
 !50 = !MDLocation(line: 9, scope: !28, inlinedAt: !48)
 !48 = !MDLocation(line: 9, scope: !32)
 !49 = !MDLocation(line: 0, scope: !28, inlinedAt: !48)
 !50 = !MDLocation(line: 9, scope: !28, inlinedAt: !48)
index e65f08df35e1b5fa5ceb07d2eb1fa403ff03de5b..48344a95f40125e752468f3e6d7d6b134ca182a0 100644 (file)
@@ -37,8 +37,8 @@ entry:
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
-!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
-!60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
+!59 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
+!60 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
index be91cf796d98360dce15f65f1a140d13603d18a3..6125565652283ac1027efd3c12287362ffccf060 100644 (file)
@@ -155,9 +155,9 @@ attributes #2 = { nounwind readnone }
 !32 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
 !33 = !MDLocation(line: 0, scope: !16, inlinedAt: !21)
 
 !32 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
 !33 = !MDLocation(line: 0, scope: !16, inlinedAt: !21)
 
-!129 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !30, inlinedAt: !22)
-!132 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30, inlinedAt: !21)
-!232 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30, inlinedAt: !37)
+!129 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !30)
+!132 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
+!232 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !16, type: !30)
 
 !34 = !MDLocation(line: 5, scope: !35)
 !35 = distinct !MDLexicalBlock(line: 5, column: 0, file: !5, scope: !36)
 
 !34 = !MDLocation(line: 5, scope: !35)
 !35 = distinct !MDLexicalBlock(line: 5, column: 0, file: !5, scope: !36)
index 223daadfd77f186d2749cf0e46df125033e1d0f3..3832e4f32b868cb81f376f94a4edd7c1f253e4c5 100644 (file)
@@ -37,8 +37,8 @@ entry:
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
 !10 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
-!109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5, inlinedAt: !17)
-!110 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12, inlinedAt: !17)
+!109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "j", line: 9, arg: 0, scope: !0, file: !1, type: !5)
+!110 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "xyz", line: 10, scope: !11, file: !1, type: !12)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
 
 !11 = distinct !MDLexicalBlock(line: 9, column: 0, file: !1, scope: !0)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "X", line: 10, size: 64, align: 32, file: !27, scope: !0, elements: !13)
index 3ef96eba4e1f18d4d88021f2b51ae1f2ad664f65..df650b750161387db2003a5a15de6ea6b8093132 100644 (file)
@@ -61,8 +61,8 @@ declare float* @bar(i32) optsize
 
 define void @foobar() nounwind optsize ssp {
 entry:
 
 define void @foobar() nounwind optsize ssp {
 entry:
-  tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !109, metadata !MDExpression()) nounwind, !dbg !31
-  tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !118, metadata !MDExpression()) nounwind, !dbg !35
+  tail call void @llvm.dbg.value(metadata %struct.S1* @p, i64 0, metadata !9, metadata !MDExpression()) nounwind, !dbg !31
+  tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !MDExpression()) nounwind, !dbg !35
   store i32 1, i32* getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 1), align 8, !dbg !36
   %call.i = tail call float* @bar(i32 1) nounwind optsize, !dbg !37
   store float* %call.i, float** getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 0), align 8, !dbg !37
   store i32 1, i32* getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 1), align 8, !dbg !36
   %call.i = tail call float* @bar(i32 1) nounwind optsize, !dbg !37
   store float* %call.i, float** getelementptr inbounds (%struct.S1, %struct.S1* @p, i64 0, i32 0), align 8, !dbg !37
@@ -84,9 +84,6 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
 !7 = !MDSubroutineType(types: !8)
 !8 = !{null}
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10)
 !7 = !MDSubroutineType(types: !8)
 !8 = !{null}
 !9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10)
-
-!109 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "sp", line: 7, arg: 1, scope: !0, file: !1, type: !10, inlinedAt: !32)
-
 !10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !11)
 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "S1", line: 4, file: !42, scope: !2, baseType: !12)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "S1", line: 1, size: 128, align: 64, file: !42, scope: !2, elements: !13)
 !10 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, scope: !2, baseType: !11)
 !11 = !MDDerivedType(tag: DW_TAG_typedef, name: "S1", line: 4, file: !42, scope: !2, baseType: !12)
 !12 = !MDCompositeType(tag: DW_TAG_structure_type, name: "S1", line: 1, size: 128, align: 64, file: !42, scope: !2, elements: !13)
@@ -96,9 +93,6 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
 !16 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
 !17 = !MDDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5)
 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5)
 !16 = !MDBasicType(tag: DW_TAG_base_type, name: "float", size: 32, align: 32, encoding: DW_ATE_float)
 !17 = !MDDerivedType(tag: DW_TAG_member, name: "nums", line: 3, size: 32, align: 32, offset: 64, file: !42, scope: !1, baseType: !5)
 !18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5)
-
-!118 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "nums", line: 7, arg: 2, scope: !0, file: !1, type: !5, inlinedAt: !32)
-
 !19 = !MDGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11, variable: %struct.S1* @p)
 !20 = !MDLocation(line: 7, column: 13, scope: !0)
 !21 = !MDLocation(line: 7, column: 21, scope: !0)
 !19 = !MDGlobalVariable(name: "p", line: 14, isLocal: false, isDefinition: true, scope: !2, file: !1, type: !11, variable: %struct.S1* @p)
 !20 = !MDLocation(line: 7, column: 13, scope: !0)
 !21 = !MDLocation(line: 7, column: 21, scope: !0)
index c779cea0a5efbbc25bcc361b81c872b3efab6d89..55872db280eccf2b3a84c9f13e37bf635beb25aa 100644 (file)
@@ -234,7 +234,7 @@ attributes #4 = { builtin }
 !29 = !MDLocation(line: 7, scope: !4)
 !30 = !MDLocation(line: 4, scope: !4, inlinedAt: !31)
 !31 = !MDLocation(line: 10, scope: !13)
 !29 = !MDLocation(line: 7, scope: !4)
 !30 = !MDLocation(line: 4, scope: !4, inlinedAt: !31)
 !31 = !MDLocation(line: 10, scope: !13)
-!32 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "p", line: 4, scope: !4, file: !5, type: !10, inlinedAt: !31)
+!32 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "p", line: 4, scope: !4, file: !5, type: !10)
 !33 = !MDLocation(line: 5, scope: !21, inlinedAt: !31)
 !34 = !MDLocation(line: 6, scope: !21, inlinedAt: !31)
 !35 = !MDLocation(line: 7, scope: !4, inlinedAt: !31)
 !33 = !MDLocation(line: 5, scope: !21, inlinedAt: !31)
 !34 = !MDLocation(line: 6, scope: !21, inlinedAt: !31)
 !35 = !MDLocation(line: 7, scope: !4, inlinedAt: !31)
index c0b4ab28fb83ab9faff50ae44bfa2d6b27227b0f..c1a367e7e0fa51f3c4daec5cc9d7e93e922dbbff 100644 (file)
@@ -88,8 +88,8 @@ attributes #1 = { nounwind readnone }
 !21 = !{i32 1, !"Debug Info Version", i32 3}
 !22 = !{!"clang version 3.5.0 "}
 !23 = !MDLocation(line: 8, scope: !13)
 !21 = !{i32 1, !"Debug Info Version", i32 3}
 !22 = !{!"clang version 3.5.0 "}
 !23 = !MDLocation(line: 8, scope: !13)
-!24 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25, inlinedAt: !23)
+!24 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !17, type: !25)
 !25 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
 !26 = !MDLocation(line: 0, scope: !17, inlinedAt: !23)
 !25 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !"_ZTS3foo")
 !26 = !MDLocation(line: 0, scope: !17, inlinedAt: !23)
-!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9, inlinedAt: !23)
+!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 2, arg: 2, scope: !17, file: !14, type: !9)
 !28 = !MDLocation(line: 2, scope: !17, inlinedAt: !23)
 !28 = !MDLocation(line: 2, scope: !17, inlinedAt: !23)
index 58393d562554f62fea2a0e99ab29dd60b9d155cf..8f7b107c5fb00019ac4c69001b15847ee3112f3e 100644 (file)
@@ -67,7 +67,7 @@ attributes #1 = { nounwind readnone }
 !16 = !MDDerivedType(tag: DW_TAG_volatile_type, baseType: !11)
 !17 = !MDLocation(line: 5, scope: !4)
 !18 = !MDLocation(line: 6, column: 7, scope: !4)
 !16 = !MDDerivedType(tag: DW_TAG_volatile_type, baseType: !11)
 !17 = !MDLocation(line: 5, scope: !4)
 !18 = !MDLocation(line: 6, column: 7, scope: !4)
-!19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 1, arg: 1, scope: !8, file: !5, type: !11, inlinedAt: !18)
+!19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 1, arg: 1, scope: !8, file: !5, type: !11)
 !20 = !MDLocation(line: 1, scope: !8, inlinedAt: !18)
 !21 = !MDLocation(line: 2, scope: !8, inlinedAt: !18)
 !22 = !MDLocation(line: 7, scope: !4)
 !20 = !MDLocation(line: 1, scope: !8, inlinedAt: !18)
 !21 = !MDLocation(line: 2, scope: !8, inlinedAt: !18)
 !22 = !MDLocation(line: 7, scope: !4)
index 49d9aa7c8692d92b338e9df77573dc663b1b74b7..26dd0cbe6086d4736e14f223b982a6e5fb6b4061 100644 (file)
@@ -50,7 +50,7 @@ attributes #1 = { nounwind readnone }
 !16 = !{!"clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)"}
 !17 = !MDExpression()
 !18 = !MDLocation(line: 2, column: 13, scope: !4)
 !16 = !{!"clang version 3.7.0 (trunk 233919) (llvm/trunk 233920)"}
 !17 = !MDExpression()
 !18 = !MDLocation(line: 2, column: 13, scope: !4)
-!19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: !10, file: !1, line: 1, type: !7, inlinedAt: !20)
+!19 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: !10, file: !1, line: 1, type: !7)
 !20 = distinct !MDLocation(line: 2, column: 25, scope: !4)
 !21 = !MDLocation(line: 1, column: 20, scope: !10, inlinedAt: !20)
 !22 = !MDLocation(line: 2, column: 18, scope: !4)
 !20 = distinct !MDLocation(line: 2, column: 25, scope: !4)
 !21 = !MDLocation(line: 1, column: 20, scope: !10, inlinedAt: !20)
 !22 = !MDLocation(line: 2, column: 18, scope: !4)
index ba19f236b34da56356460846e603a1c92bbf7328..e4fb0626d9e4390d4f4e87cc31073df6aaa5f792 100644 (file)
@@ -124,7 +124,7 @@ attributes #3 = { nounwind }
 !24 = !{i32 2, !"Debug Info Version", i32 3}
 !25 = !{!"clang version 3.5.0 "}
 !26 = !MDLocation(line: 15, scope: !11)
 !24 = !{i32 2, !"Debug Info Version", i32 3}
 !25 = !{!"clang version 3.5.0 "}
 !26 = !MDLocation(line: 15, scope: !11)
-!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "lhs", line: 13, arg: 1, scope: !17, file: !12, type: !20, inlinedAt: !28)
+!27 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "lhs", line: 13, arg: 1, scope: !17, file: !12, type: !20)
 !28 = !MDLocation(line: 16, scope: !11)
 !29 = !MDLocation(line: 13, scope: !17, inlinedAt: !28)
 !30 = !MDLocation(line: 17, scope: !11)
 !28 = !MDLocation(line: 16, scope: !11)
 !29 = !MDLocation(line: 13, scope: !17, inlinedAt: !28)
 !30 = !MDLocation(line: 17, scope: !11)
index 65fd494aeed6ece3da1ec3ce5a7a6fc91585e508..22394c8cc1632640e1374fdfe54d3fabd1bac124 100644 (file)
@@ -196,7 +196,7 @@ attributes #3 = { ssp uwtable }
 !57 = !MDLocation(line: 23, column: 15, scope: !24)
 !58 = !MDLocation(line: 23, column: 7, scope: !24)
 !59 = !MDLocation(line: 24, column: 9, scope: !24)
 !57 = !MDLocation(line: 23, column: 15, scope: !24)
 !58 = !MDLocation(line: 23, column: 7, scope: !24)
 !59 = !MDLocation(line: 24, column: 9, scope: !24)
-!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A", inlinedAt: !61)
+!60 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p5", line: 7, arg: 1, scope: !11, file: !12, type: !"_ZTS1A")
 !61 = distinct !MDLocation(line: 26, column: 7, scope: !24)
 !62 = !MDLocation(line: 7, column: 42, scope: !11, inlinedAt: !61)
 !63 = !MDLocation(line: 7, column: 48, scope: !11, inlinedAt: !61)
 !61 = distinct !MDLocation(line: 26, column: 7, scope: !24)
 !62 = !MDLocation(line: 7, column: 42, scope: !11, inlinedAt: !61)
 !63 = !MDLocation(line: 7, column: 48, scope: !11, inlinedAt: !61)
index 0d734ee7b80254c9b41f2a3c8cba278d3dccdffb..e20be8357eb5cf0e749a4286ff2ee43264ec9300 100644 (file)
@@ -236,7 +236,7 @@ attributes #3 = { nounwind }
 !34 = !{!"any pointer", !35, i64 0}
 !35 = !{!"omnipotent char", !36, i64 0}
 !36 = !{!"Simple C/C++ TBAA"}
 !34 = !{!"any pointer", !35, i64 0}
 !35 = !{!"omnipotent char", !36, i64 0}
 !36 = !{!"Simple C/C++ TBAA"}
-!37 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !32)
+!37 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25)
 !38 = !MDLocation(line: 0, scope: !22, inlinedAt: !32)
 !39 = !MDLocation(line: 8, scope: !22, inlinedAt: !32)
 !40 = !MDLocation(line: 9, scope: !41, inlinedAt: !32)
 !38 = !MDLocation(line: 0, scope: !22, inlinedAt: !32)
 !39 = !MDLocation(line: 8, scope: !22, inlinedAt: !32)
 !40 = !MDLocation(line: 9, scope: !41, inlinedAt: !32)
@@ -256,7 +256,7 @@ attributes #3 = { nounwind }
 !54 = !MDLocation(line: 20, scope: !18, inlinedAt: !55)
 !55 = !MDLocation(line: 10, scope: !22)
 !56 = !MDLocation(line: 17, scope: !14, inlinedAt: !54)
 !54 = !MDLocation(line: 20, scope: !18, inlinedAt: !55)
 !55 = !MDLocation(line: 10, scope: !22)
 !56 = !MDLocation(line: 17, scope: !14, inlinedAt: !54)
-!57 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !56)
+!57 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25)
 !58 = !MDLocation(line: 0, scope: !22, inlinedAt: !56)
 !59 = !MDLocation(line: 8, scope: !22, inlinedAt: !56)
 !60 = !MDLocation(line: 9, scope: !41, inlinedAt: !56)
 !58 = !MDLocation(line: 0, scope: !22, inlinedAt: !56)
 !59 = !MDLocation(line: 8, scope: !22, inlinedAt: !56)
 !60 = !MDLocation(line: 9, scope: !41, inlinedAt: !56)
@@ -266,7 +266,7 @@ attributes #3 = { nounwind }
 !64 = !MDLocation(line: 16, scope: !14, inlinedAt: !65)
 !65 = !MDLocation(line: 20, scope: !18)
 !66 = !MDLocation(line: 17, scope: !14, inlinedAt: !65)
 !64 = !MDLocation(line: 16, scope: !14, inlinedAt: !65)
 !65 = !MDLocation(line: 20, scope: !18)
 !66 = !MDLocation(line: 17, scope: !14, inlinedAt: !65)
-!67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25, inlinedAt: !66)
+!67 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !22, type: !25)
 !68 = !MDLocation(line: 0, scope: !22, inlinedAt: !66)
 !69 = !MDLocation(line: 8, scope: !22, inlinedAt: !66)
 !70 = !MDLocation(line: 9, scope: !41, inlinedAt: !66)
 !68 = !MDLocation(line: 0, scope: !22, inlinedAt: !66)
 !69 = !MDLocation(line: 8, scope: !22, inlinedAt: !66)
 !70 = !MDLocation(line: 9, scope: !41, inlinedAt: !66)
index 216c2f7bd0d6b9ae6208254fdc6e6e069ed52efc..31f49e91bc02057d294d0086c611010fd6f41e48 100644 (file)
@@ -134,7 +134,7 @@ attributes #3 = { nounwind }
 !19 = !MDLocation(line: 4, scope: !4)
 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8)
 
 !19 = !MDLocation(line: 4, scope: !4)
 !20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8)
 
-!120 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8, inlinedAt: !19)
+!120 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 1, arg: 1, scope: !12, file: !13, type: !8)
 
 !21 = !MDLocation(line: 1, scope: !12, inlinedAt: !19)
 !22 = !MDLocation(line: 2, scope: !12, inlinedAt: !19)
 
 !21 = !MDLocation(line: 1, scope: !12, inlinedAt: !19)
 !22 = !MDLocation(line: 2, scope: !12, inlinedAt: !19)
index 6419edf699b9575a1101b8b59bbe004cf0ddbfa2..55c035b6d850fc0cf45eea76275ff560a8db02b9 100644 (file)
@@ -111,7 +111,7 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
 !13 = !{i32 2, !"Dwarf Version", i32 4}
 !14 = !{i32 1, !"Debug Info Version", i32 3}
 !15 = !{!"clang version 3.5.0 "}
 !13 = !{i32 2, !"Dwarf Version", i32 4}
 !14 = !{i32 1, !"Debug Info Version", i32 3}
 !15 = !{!"clang version 3.5.0 "}
-!16 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 3, scope: !17, file: !11, type: !18, inlinedAt: !20)
+!16 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 3, scope: !17, file: !11, type: !18)
 !17 = distinct !MDLexicalBlock(line: 3, column: 0, file: !1, scope: !12)
 !18 = !MDBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
 !19 = !MDLocation(line: 3, scope: !17, inlinedAt: !20)
 !17 = distinct !MDLexicalBlock(line: 3, column: 0, file: !1, scope: !12)
 !18 = !MDBasicType(tag: DW_TAG_base_type, name: "bool", size: 8, align: 8, encoding: DW_ATE_boolean)
 !19 = !MDLocation(line: 3, scope: !17, inlinedAt: !20)
@@ -119,7 +119,7 @@ attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "n
 !21 = !MDLocation(line: 4, scope: !17, inlinedAt: !20)
 !22 = !MDLocation(line: 5, scope: !12, inlinedAt: !20)
 !23 = !MDLocation(line: 6, scope: !12, inlinedAt: !20)
 !21 = !MDLocation(line: 4, scope: !17, inlinedAt: !20)
 !22 = !MDLocation(line: 5, scope: !12, inlinedAt: !20)
 !23 = !MDLocation(line: 6, scope: !12, inlinedAt: !20)
-!24 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 2, scope: !25, file: !6, type: !18, inlinedAt: !28)
+!24 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "b", line: 2, scope: !25, file: !6, type: !18)
 !25 = distinct !MDLexicalBlock(line: 2, column: 0, file: !5, scope: !26)
 !26 = !MDLexicalBlockFile(discriminator: 0, file: !5, scope: !10)
 !27 = !MDLocation(line: 2, scope: !25, inlinedAt: !28)
 !25 = distinct !MDLexicalBlock(line: 2, column: 0, file: !5, scope: !26)
 !26 = !MDLexicalBlockFile(discriminator: 0, file: !5, scope: !10)
 !27 = !MDLocation(line: 2, scope: !25, inlinedAt: !28)
index 588633397d2800af1384e81fbc212f60f30c5252..5d416f7dc7f21eff152516bc0ae15e0ff18106a7 100644 (file)
@@ -66,11 +66,11 @@ attributes #2 = { nounwind readnone }
 !13 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 1, scope: !8, file: !5, type: !11)
 !14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 6, arg: 2, scope: !8, file: !5, type: !11)
 !15 = !{i32 undef}
 !13 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 1, scope: !8, file: !5, type: !11)
 !14 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 6, arg: 2, scope: !8, file: !5, type: !11)
 !15 = !{i32 undef}
-!16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 1, scope: !8, file: !5, type: !11, inlinedAt: !17)
+!16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 6, arg: 1, scope: !8, file: !5, type: !11)
 !17 = !MDLocation(line: 4, scope: !4)
 !18 = !MDLocation(line: 6, scope: !8, inlinedAt: !17)
 !19 = !{i32 2}
 !17 = !MDLocation(line: 4, scope: !4)
 !18 = !MDLocation(line: 6, scope: !8, inlinedAt: !17)
 !19 = !{i32 2}
-!20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 6, arg: 2, scope: !8, file: !5, type: !11, inlinedAt: !17)
+!20 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 6, arg: 2, scope: !8, file: !5, type: !11)
 !21 = !MDLocation(line: 7, scope: !8, inlinedAt: !17)
 !22 = !MDLocation(line: 5, scope: !4)
 !23 = !MDLocation(line: 6, scope: !8)
 !21 = !MDLocation(line: 7, scope: !8, inlinedAt: !17)
 !22 = !MDLocation(line: 5, scope: !4)
 !23 = !MDLocation(line: 6, scope: !8)
index 8e2ee3a75d2a7aa8416d18af7950fcff321bef8b..2cf59cd005a5b4758c5abc7804302e3151a3a960 100644 (file)
@@ -45,10 +45,10 @@ declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnon
 ; VARIABLE: {{.*Abbrev.*DW_TAG_variable}}
 ; VARIABLE-NOT: {{.*Abbrev.*DW_TAG_variable}}
 
 ; VARIABLE: {{.*Abbrev.*DW_TAG_variable}}
 ; VARIABLE-NOT: {{.*Abbrev.*DW_TAG_variable}}
 
-!18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argument", line: 3, arg: 1, scope: !10, file: !6, type: !9, inlinedAt: !19)
+!18 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "argument", line: 3, arg: 1, scope: !10, file: !6, type: !9)
 !19 = !MDLocation(line: 11, column: 10, scope: !5)
 !21 = !MDLocation(line: 3, column: 25, scope: !10, inlinedAt: !19)
 !19 = !MDLocation(line: 11, column: 10, scope: !5)
 !21 = !MDLocation(line: 3, column: 25, scope: !10, inlinedAt: !19)
-!22 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "local", line: 4, scope: !10, file: !6, type: !9, inlinedAt: !19)
+!22 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "local", line: 4, scope: !10, file: !6, type: !9)
 !23 = !MDLocation(line: 4, column: 16, scope: !10, inlinedAt: !19)
 !24 = !MDLocation(line: 5, column: 3, scope: !10, inlinedAt: !19)
 !25 = !MDLocation(line: 6, column: 3, scope: !10, inlinedAt: !19)
 !23 = !MDLocation(line: 4, column: 16, scope: !10, inlinedAt: !19)
 !24 = !MDLocation(line: 5, column: 3, scope: !10, inlinedAt: !19)
 !25 = !MDLocation(line: 6, column: 3, scope: !10, inlinedAt: !19)
index 84123cf34ae0d55a109a7de72cb398e712a1ba42..a26afb73029852ad0ce412b9de60aaa90072c006 100644 (file)
@@ -160,13 +160,13 @@ attributes #2 = { nounwind readnone }
 !22 = !{i32 2, !"Debug Info Version", i32 3}
 !23 = !{!"clang version 3.5.0 "}
 !24 = !{i1 false}
 !22 = !{i32 2, !"Debug Info Version", i32 3}
 !23 = !{!"clang version 3.5.0 "}
 !24 = !{i1 false}
-!25 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 1, scope: !14, file: !5, type: !11, inlinedAt: !26)
+!25 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 1, scope: !14, file: !5, type: !11)
 !26 = !MDLocation(line: 14, scope: !4)
 !27 = !MDLocation(line: 5, scope: !14, inlinedAt: !26)
 !28 = !MDLocation(line: 10, scope: !14, inlinedAt: !26)
 !29 = !MDLocation(line: 15, scope: !4)
 !30 = !MDLocation(line: 17, scope: !8)
 !26 = !MDLocation(line: 14, scope: !4)
 !27 = !MDLocation(line: 5, scope: !14, inlinedAt: !26)
 !28 = !MDLocation(line: 10, scope: !14, inlinedAt: !26)
 !29 = !MDLocation(line: 15, scope: !4)
 !30 = !MDLocation(line: 17, scope: !8)
-!31 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 1, scope: !14, file: !5, type: !11, inlinedAt: !32)
+!31 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "b", line: 5, arg: 1, scope: !14, file: !5, type: !11)
 !32 = !MDLocation(line: 18, scope: !8)
 !33 = !MDLocation(line: 5, scope: !14, inlinedAt: !32)
 !34 = !MDLocation(line: 6, scope: !19, inlinedAt: !32)
 !32 = !MDLocation(line: 18, scope: !8)
 !33 = !MDLocation(line: 5, scope: !14, inlinedAt: !32)
 !34 = !MDLocation(line: 6, scope: !19, inlinedAt: !32)
@@ -175,7 +175,7 @@ attributes #2 = { nounwind readnone }
 !37 = !{!"int", !38, i64 0}
 !38 = !{!"omnipotent char", !39, i64 0}
 !39 = !{!"Simple C/C++ TBAA"}
 !37 = !{!"int", !38, i64 0}
 !38 = !{!"omnipotent char", !39, i64 0}
 !39 = !{!"Simple C/C++ TBAA"}
-!40 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "s", line: 7, scope: !18, file: !5, type: !20, inlinedAt: !32)
+!40 = !MDLocalVariable(tag: DW_TAG_auto_variable, name: "s", line: 7, scope: !18, file: !5, type: !20)
 !41 = !MDLocation(line: 8, scope: !18, inlinedAt: !32)
 !42 = !MDLocation(line: 9, scope: !18, inlinedAt: !32)
 !43 = !MDLocation(line: 10, scope: !14, inlinedAt: !32)
 !41 = !MDLocation(line: 8, scope: !18, inlinedAt: !32)
 !42 = !MDLocation(line: 9, scope: !18, inlinedAt: !32)
 !43 = !MDLocation(line: 10, scope: !14, inlinedAt: !32)
index f186ed48c5aef578f3bf32315244320f7a3587c9..8628b3d465efcfff216796608cd91f10a7043794 100644 (file)
@@ -89,7 +89,7 @@ attributes #2 = { nounwind readnone }
 !16 = !MDLocation(line: 5, scope: !4)
 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8)
 
 !16 = !MDLocation(line: 5, scope: !4)
 !17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8)
 
-!117 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8, inlinedAt: !16)
+!117 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "i", line: 6, arg: 1, scope: !9, file: !5, type: !8)
 
 !18 = !MDLocation(line: 6, scope: !9, inlinedAt: !16)
 !19 = !MDLocation(line: 6, scope: !9)
 
 !18 = !MDLocation(line: 6, scope: !9, inlinedAt: !16)
 !19 = !MDLocation(line: 6, scope: !9)
index eb912f5ce2f0a5bfd982f9cf788de56d0e7649f6..7e649a22863c450f4ff9e281e9c36e277baa1c27 100644 (file)
@@ -128,7 +128,7 @@ attributes #3 = { noreturn nounwind }
 !43 = !{!37, !37, i64 0}
 !44 = !{!38, !38, i64 0}
 !45 = !MDLocation(line: 9, scope: !15)
 !43 = !{!37, !37, i64 0}
 !44 = !{!38, !38, i64 0}
 !45 = !MDLocation(line: 9, scope: !15)
-!46 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !"_ZTS1A", inlinedAt: !47)
+!46 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "p1", line: 6, arg: 1, scope: !15, file: !16, type: !"_ZTS1A")
 !47 = distinct !MDLocation(line: 11, scope: !21)
 !48 = !MDExpression(DW_OP_bit_piece, 32, 160)
 !49 = !MDLocation(line: 6, scope: !15, inlinedAt: !47)
 !47 = distinct !MDLocation(line: 11, scope: !21)
 !48 = !MDExpression(DW_OP_bit_piece, 32, 160)
 !49 = !MDLocation(line: 6, scope: !15, inlinedAt: !47)
index 4dc102872bd054f389715ec453e6e2eac827c48a..e34a43b3492f421cb9cad7e493c903c00588faf3 100644 (file)
@@ -94,6 +94,6 @@ attributes #1 = { nounwind readnone }
 
 ; CHECK: [[FOO:![0-9]+]] = !MDSubprogram(name: "foo",
 ; CHECK: [[BAR:![0-9]+]] = !MDSubprogram(name: "bar",
 
 ; CHECK: [[FOO:![0-9]+]] = !MDSubprogram(name: "foo",
 ; CHECK: [[BAR:![0-9]+]] = !MDSubprogram(name: "bar",
+; CHECK: [[m23]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: [[FOO]]
 ; CHECK: [[CALL_SITE:![0-9]+]] = distinct !MDLocation(line: 8, column: 14, scope: [[BAR]])
 ; CHECK: [[CALL_SITE:![0-9]+]] = distinct !MDLocation(line: 8, column: 14, scope: [[BAR]])
-; CHECK: [[m23]] = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 1, scope: [[FOO]],{{.*}} inlinedAt: [[CALL_SITE]])
 ; CHECK: [[m24]] = !MDLocation(line: 1, column: 17, scope: [[FOO]], inlinedAt: [[CALL_SITE]])
 ; CHECK: [[m24]] = !MDLocation(line: 1, column: 17, scope: [[FOO]], inlinedAt: [[CALL_SITE]])
index 2e7a6e6fde8a8fc179ac078f975110aa479da5fc..e60acc4ca9b814a8b1aafd7a2d80ba821144775a 100644 (file)
@@ -41,15 +41,15 @@ return:                                           ; preds = %entry
 !6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !7 = !MDLocation(line: 8, scope: !1)
 !8 = !MDLocation(line: 9, scope: !1)
 !6 = !MDBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
 !7 = !MDLocation(line: 8, scope: !1)
 !8 = !MDLocation(line: 9, scope: !1)
-!9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 0, scope: !10, file: !2, type: !6, inlinedAt: !8)
+!9 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "x", line: 4, arg: 0, scope: !10, file: !2, type: !6)
 !10 = !MDSubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !20, scope: !2, type: !11)
 !11 = !MDSubroutineType(types: !12)
 !12 = !{null, !6, !13, !14}
 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)
 !14 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !20, scope: !2, baseType: null)
 !15 = !MDLocation(line: 4, scope: !10, inlinedAt: !8)
 !10 = !MDSubprogram(name: "bar", linkageName: "bar", line: 4, isLocal: true, isDefinition: true, virtualIndex: 6, isOptimized: false, scopeLine: 4, file: !20, scope: !2, type: !11)
 !11 = !MDSubroutineType(types: !12)
 !12 = !{null, !6, !13, !14}
 !13 = !MDBasicType(tag: DW_TAG_base_type, name: "long int", size: 64, align: 64, encoding: DW_ATE_signed)
 !14 = !MDDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, file: !20, scope: !2, baseType: null)
 !15 = !MDLocation(line: 4, scope: !10, inlinedAt: !8)
-!16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 0, scope: !10, file: !2, type: !13, inlinedAt: !8)
-!17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 0, scope: !10, file: !2, type: !14, inlinedAt: !8)
+!16 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "y", line: 4, arg: 0, scope: !10, file: !2, type: !13)
+!17 = !MDLocalVariable(tag: DW_TAG_arg_variable, name: "z", line: 4, arg: 0, scope: !10, file: !2, type: !14)
 !18 = !MDLocation(line: 5, scope: !10, inlinedAt: !8)
 !19 = !MDLocation(line: 10, scope: !1)
 !20 = !MDFile(filename: "bar.c", directory: "/tmp/")
 !18 = !MDLocation(line: 5, scope: !10, inlinedAt: !8)
 !19 = !MDLocation(line: 10, scope: !1)
 !20 = !MDFile(filename: "bar.c", directory: "/tmp/")
index 01bcb308b7d59298ab626d47e770738f7723e190..46e376a9ad29fad21be9e5d07bfcbed55d2430d3 100644 (file)
@@ -1813,11 +1813,9 @@ TEST_F(MDLocalVariableTest, get) {
   MDTypeRef Type = getDerivedType();
   unsigned Arg = 6;
   unsigned Flags = 7;
   MDTypeRef Type = getDerivedType();
   unsigned Arg = 6;
   unsigned Flags = 7;
-  MDLocation *InlinedAt =
-      MDLocation::getDistinct(Context, 10, 20, getSubprogram());
 
   auto *N = MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
 
   auto *N = MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
-                                 Arg, Flags, InlinedAt);
+                                 Arg, Flags);
   EXPECT_EQ(Tag, N->getTag());
   EXPECT_EQ(Scope, N->getScope());
   EXPECT_EQ(Name, N->getName());
   EXPECT_EQ(Tag, N->getTag());
   EXPECT_EQ(Scope, N->getScope());
   EXPECT_EQ(Name, N->getName());
@@ -1826,46 +1824,28 @@ TEST_F(MDLocalVariableTest, get) {
   EXPECT_EQ(Type, N->getType());
   EXPECT_EQ(Arg, N->getArg());
   EXPECT_EQ(Flags, N->getFlags());
   EXPECT_EQ(Type, N->getType());
   EXPECT_EQ(Arg, N->getArg());
   EXPECT_EQ(Flags, N->getFlags());
-  EXPECT_EQ(InlinedAt, N->getInlinedAt());
   EXPECT_EQ(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
   EXPECT_EQ(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
-                                    Arg, Flags, InlinedAt));
+                                    Arg, Flags));
 
   EXPECT_NE(N, MDLocalVariable::get(Context, dwarf::DW_TAG_auto_variable, Scope,
 
   EXPECT_NE(N, MDLocalVariable::get(Context, dwarf::DW_TAG_auto_variable, Scope,
-                                    Name, File, Line, Type, Arg, Flags,
-                                    InlinedAt));
+                                    Name, File, Line, Type, Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, getSubprogram(), Name, File,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, getSubprogram(), Name, File,
-                                    Line, Type, Arg, Flags, InlinedAt));
+                                    Line, Type, Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, "other", File, Line,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, "other", File, Line,
-                                    Type, Arg, Flags, InlinedAt));
+                                    Type, Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, getFile(), Line,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, getFile(), Line,
-                                    Type, Arg, Flags, InlinedAt));
+                                    Type, Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line + 1,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line + 1,
-                                    Type, Arg, Flags, InlinedAt));
+                                    Type, Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line,
-                                    getDerivedType(), Arg, Flags, InlinedAt));
+                                    getDerivedType(), Arg, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
-                                    Arg + 1, Flags, InlinedAt));
+                                    Arg + 1, Flags));
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
   EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
-                                    Arg, ~Flags, InlinedAt));
-  EXPECT_NE(N, MDLocalVariable::get(
-                   Context, Tag, Scope, Name, File, Line, Type, Arg, Flags,
-                   MDLocation::getDistinct(Context, 10, 20, getSubprogram())));
+                                    Arg, ~Flags));
 
   TempMDLocalVariable Temp = N->clone();
   EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
 
   TempMDLocalVariable Temp = N->clone();
   EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
-
-  auto *Inlined = N->withoutInline();
-  EXPECT_NE(N, Inlined);
-  EXPECT_EQ(N->getTag(), Inlined->getTag());
-  EXPECT_EQ(N->getScope(), Inlined->getScope());
-  EXPECT_EQ(N->getName(), Inlined->getName());
-  EXPECT_EQ(N->getFile(), Inlined->getFile());
-  EXPECT_EQ(N->getLine(), Inlined->getLine());
-  EXPECT_EQ(N->getType(), Inlined->getType());
-  EXPECT_EQ(N->getArg(), Inlined->getArg());
-  EXPECT_EQ(N->getFlags(), Inlined->getFlags());
-  EXPECT_EQ(nullptr, Inlined->getInlinedAt());
-  EXPECT_EQ(N, Inlined->withInline(cast<MDLocation>(InlinedAt)));
 }
 
 typedef MetadataTest MDExpressionTest;
 }
 
 typedef MetadataTest MDExpressionTest;