DebugInfo: Drop rest of DIDescriptor subclasses
[oota-llvm.git] / lib / CodeGen / LiveDebugVariables.cpp
index a07a7c9e5677187dcb1b1c77e4a6ffec907741a6..df48c53f16bcf206107812b2d9dccc2d7b01897b 100644 (file)
@@ -158,10 +158,10 @@ public:
   UserValue *getNext() const { return next; }
 
   /// match - Does this UserValue match the parameters?
-  bool match(const MDNode *Var, const MDNode *Expr, unsigned Offset,
-             bool indirect) const {
-    return Var == Variable && Expr == Expression && Offset == offset &&
-           indirect == IsIndirect;
+  bool match(const MDNode *Var, const MDNode *Expr, const MDLocation *IA,
+             unsigned Offset, bool indirect) const {
+    return Var == Variable && Expr == Expression && dl->getInlinedAt() == IA &&
+           Offset == offset && indirect == IsIndirect;
   }
 
   /// merge - Merge equivalence classes.
@@ -362,9 +362,9 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS,
   if (!DL)
     return;
 
-  DIScope Scope = cast<MDScope>(DL.getScope());
+  auto *Scope = cast<MDScope>(DL.getScope());
   // Omit the directory, because it's likely to be long and uninteresting.
-  CommentOS << Scope.getFilename();
+  CommentOS << Scope->getFilename();
   CommentOS << ':' << DL.getLine();
   if (DL.getCol() != 0)
     CommentOS << ':' << DL.getCol();
@@ -394,7 +394,7 @@ static void printExtendedName(raw_ostream &OS, const MDLocalVariable *V,
 }
 
 void UserValue::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
-  DIVariable DV = cast<MDLocalVariable>(Variable);
+  auto *DV = cast<MDLocalVariable>(Variable);
   OS << "!\"";
   printExtendedName(OS, DV, dl);
 
@@ -464,7 +464,7 @@ UserValue *LDVImpl::getUserValue(const MDNode *Var, const MDNode *Expr,
     UserValue *UV = Leader->getLeader();
     Leader = UV;
     for (; UV; UV = UV->getNext())
-      if (UV->match(Var, Expr, Offset, IsIndirect))
+      if (UV->match(Var, Expr, DL->getInlinedAt(), Offset, IsIndirect))
         return UV;
   }