- static unsigned getHashValue(const DebugLocTuple &Val) {
- return DenseMapInfo<GlobalVariable*>::getHashValue(Val.CompileUnit) ^
- DenseMapInfo<unsigned>::getHashValue(Val.Line) ^
- DenseMapInfo<unsigned>::getHashValue(Val.Col);
- }
- static bool isEqual(const DebugLocTuple &LHS, const DebugLocTuple &RHS) {
- return LHS.CompileUnit == RHS.CompileUnit &&
- LHS.Line == RHS.Line &&
- LHS.Col == RHS.Col;
+
+ /// getScope - This returns the scope pointer for this DebugLoc, or null if
+ /// invalid.
+ MDNode *getScope(const LLVMContext &Ctx) const;
+
+ /// getInlinedAt - This returns the InlinedAt pointer for this DebugLoc, or
+ /// null if invalid or not present.
+ MDNode *getInlinedAt(const LLVMContext &Ctx) const;
+
+ /// getScopeAndInlinedAt - Return both the Scope and the InlinedAt values.
+ void getScopeAndInlinedAt(MDNode *&Scope, MDNode *&IA,
+ const LLVMContext &Ctx) const;
+
+
+ /// getAsMDNode - This method converts the compressed DebugLoc node into a
+ /// DILocation compatible MDNode.
+ MDNode *getAsMDNode(const LLVMContext &Ctx) const;
+
+ bool operator==(const DebugLoc &DL) const {
+ return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx;