aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/DebugLoc.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
committerChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
commitde4845c163a5847c82d7ce10ed0c320098bce6e0 (patch)
tree797abd5d6d511637b4b4095246b46473f88f5bf8 /include/llvm/Support/DebugLoc.h
parentf28f8bc40eedc6304ab25dd8bed486fa08f51f70 (diff)
downloadexternal_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.zip
external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.gz
external_llvm-de4845c163a5847c82d7ce10ed0c320098bce6e0.tar.bz2
Switch the code generator (except the JIT) onto the new DebugLoc
representation. This eliminates the 'DILocation' MDNodes for file/line/col tuples from -O0 -g codegen. This remove the old DebugLoc class, making it a typedef for DebugLoc, I'll rename NewDebugLoc next. I didn't update the JIT to use the new apis, so it will continue to work, but be as slow as before. Someone should eventually do this or, better yet, rip out the JIT debug info stuff and build the JIT on top of MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100209 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/DebugLoc.h')
-rw-r--r--include/llvm/Support/DebugLoc.h40
1 files changed, 6 insertions, 34 deletions
diff --git a/include/llvm/Support/DebugLoc.h b/include/llvm/Support/DebugLoc.h
index ede1ed3..2da632c 100644
--- a/include/llvm/Support/DebugLoc.h
+++ b/include/llvm/Support/DebugLoc.h
@@ -77,44 +77,16 @@ namespace llvm {
return LineCol == DL.LineCol && ScopeIdx == DL.ScopeIdx;
}
bool operator!=(const NewDebugLoc &DL) const { return !(*this == DL); }
+
+
+
+
+ static NewDebugLoc getUnknownLoc() { NewDebugLoc L; return L; }
};
+ typedef NewDebugLoc DebugLoc;
- /// DebugLoc - Debug location id. This is carried by SDNode and MachineInstr
- /// to index into a vector of unique debug location tuples.
- class DebugLoc {
- unsigned Idx;
- public:
- DebugLoc() : Idx(~0U) {} // Defaults to invalid.
-
- static DebugLoc getUnknownLoc() { DebugLoc L; L.Idx = ~0U; return L; }
- static DebugLoc get(unsigned idx) { DebugLoc L; L.Idx = idx; return L; }
-
- unsigned getIndex() const { return Idx; }
-
- /// isUnknown - Return true if there is no debug info for the SDNode /
- /// MachineInstr.
- bool isUnknown() const { return Idx == ~0U; }
-
- bool operator==(const DebugLoc &DL) const { return Idx == DL.Idx; }
- bool operator!=(const DebugLoc &DL) const { return !(*this == DL); }
- };
-
- /// DebugLocTracker - This class tracks debug location information.
- ///
- struct DebugLocTracker {
- /// DebugLocations - A vector of unique DebugLocTuple's.
- ///
- std::vector<MDNode *> DebugLocations;
-
- /// DebugIdMap - This maps DebugLocTuple's to indices into the
- /// DebugLocations vector.
- DenseMap<MDNode *, unsigned> DebugIdMap;
-
- DebugLocTracker() {}
- };
-
} // end namespace llvm
#endif /* LLVM_DEBUGLOC_H */