From 15e723d2c6021bbeacad9baa9c0d946d4a19867e Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 28 Aug 2009 23:24:31 +0000 Subject: Reapply 79977. Use MDNodes to encode debug info in llvm IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/DebugLoc.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/llvm/Support') diff --git a/include/llvm/Support/DebugLoc.h b/include/llvm/Support/DebugLoc.h index 8ef7e4a..0bfad7c 100644 --- a/include/llvm/Support/DebugLoc.h +++ b/include/llvm/Support/DebugLoc.h @@ -19,19 +19,19 @@ #include 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::getHashValue(Val.CompileUnit) ^ + return DenseMapInfo::getHashValue(Val.CompileUnit) ^ DenseMapInfo::getHashValue(Val.Line) ^ DenseMapInfo::getHashValue(Val.Col); } -- cgit v1.1