Reapply 79977.
[oota-llvm.git] / include / llvm / Support / DebugLoc.h
index 8ef7e4afc4474cc307f5999bb037040c9f59b985..0bfad7cc0b75dcde3948ecb6f877b27da1e5b857 100644 (file)
 #include <vector>
 
 namespace llvm {
-  class GlobalVariable;
+  class MDNode;
 
   /// DebugLocTuple - Debug location tuple of filename id, line and column.
   ///
   struct DebugLocTuple {
-    GlobalVariable *CompileUnit;
+    MDNode *CompileUnit;
     unsigned Line, Col;
 
     DebugLocTuple()
       : CompileUnit(0), Line(~0U), Col(~0U) {};
 
-    DebugLocTuple(GlobalVariable *v, unsigned l, unsigned c)
-      : CompileUnit(v), Line(l), Col(c) {};
+    DebugLocTuple(MDNode *n, unsigned l, unsigned c)
+      : CompileUnit(n), Line(l), Col(c) {};
 
     bool operator==(const DebugLocTuple &DLT) const {
       return CompileUnit == DLT.CompileUnit &&
@@ -69,10 +69,10 @@ namespace llvm {
       return DebugLocTuple(0, ~0U, ~0U);
     }
     static inline DebugLocTuple getTombstoneKey() {
-      return DebugLocTuple((GlobalVariable*)~1U, ~1U, ~1U);
+      return DebugLocTuple((MDNode*)~1U, ~1U, ~1U);
     }
     static unsigned getHashValue(const DebugLocTuple &Val) {
-      return DenseMapInfo<GlobalVariable*>::getHashValue(Val.CompileUnit) ^
+      return DenseMapInfo<MDNode*>::getHashValue(Val.CompileUnit) ^
              DenseMapInfo<unsigned>::getHashValue(Val.Line) ^
              DenseMapInfo<unsigned>::getHashValue(Val.Col);
     }