aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorevancheng <evancheng@91177308-0d34-0410-b5e6-96231b3b80d8>2009-01-26 07:53:42 +0000
committerevancheng <evancheng@91177308-0d34-0410-b5e6-96231b3b80d8>2009-01-26 07:53:42 +0000
commit4e4168febaeb82433a8611803b696d0b9458e616 (patch)
treee85a0d443e61cc9bbba6b47765d5bde47664274b /include/llvm
parent2dbde507ec0cf5abb4a88ab96fb997e39ec0a046 (diff)
downloadexternal_llvm-4e4168febaeb82433a8611803b696d0b9458e616.tar.gz
external_llvm-4e4168febaeb82433a8611803b696d0b9458e616.tar.bz2
external_llvm-4e4168febaeb82433a8611803b696d0b9458e616.zip
Actually source file has already been uniquified into an id during isel. Eliminate the StringMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/DebugLoc.h30
-rw-r--r--include/llvm/CodeGen/MachineFunction.h4
2 files changed, 9 insertions, 25 deletions
diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h
index ad68839b05..b6097afe30 100644
--- a/include/llvm/CodeGen/DebugLoc.h
+++ b/include/llvm/CodeGen/DebugLoc.h
@@ -14,7 +14,6 @@
#define LLVM_CODEGEN_DEBUGLOC_H
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/StringMap.h"
#include <vector>
namespace llvm {
@@ -22,10 +21,10 @@ namespace llvm {
/// DebugLocTuple - Debug location tuple of filename id, line and column.
///
struct DebugLocTuple {
- unsigned FileId, Line, Col;
+ unsigned Src, Line, Col;
- DebugLocTuple(unsigned fi, unsigned l, unsigned c)
- : FileId(fi), Line(l), Col(c) {};
+ DebugLocTuple(unsigned s, unsigned l, unsigned c)
+ : Src(s), Line(l), Col(c) {};
};
/// DebugLoc - Debug location id. This is carried by SDNode and
@@ -51,14 +50,14 @@ namespace llvm {
return DebugLocTuple(~1U, ~1U, ~1U);
}
static unsigned getHashValue(const DebugLocTuple &Val) {
- return DenseMapInfo<unsigned>::getHashValue(Val.FileId) ^
+ return DenseMapInfo<unsigned>::getHashValue(Val.Src) ^
DenseMapInfo<unsigned>::getHashValue(Val.Line) ^
DenseMapInfo<unsigned>::getHashValue(Val.Col);
}
static bool isEqual(const DebugLocTuple &LHS, const DebugLocTuple &RHS) {
- return LHS.FileId == RHS.FileId &&
+ return LHS.Src == RHS.Src &&
LHS.Line == RHS.Line &&
- LHS.Col == RHS.Col;
+ LHS.Col == RHS.Col;
}
static bool isPod() { return true; }
@@ -70,18 +69,6 @@ namespace llvm {
/// DebugLocTracker - This class tracks debug location information.
///
struct DebugLocTracker {
- // NumFilenames - Size of the DebugFilenames vector.
- //
- unsigned NumFilenames;
-
- // DebugFilenames - A vector of unique file names.
- //
- std::vector<std::string> DebugFilenames;
-
- // DebugFilenamesMap - File name to DebugFilenames index map.
- //
- StringMap<unsigned> DebugFilenamesMap;
-
// NumDebugLocations - Size of the DebugLocations vector.
unsigned NumDebugLocations;
@@ -93,12 +80,9 @@ namespace llvm {
// DebugLocations vector.
DebugIdMapType DebugIdMap;
- DebugLocTracker() : NumFilenames(0), NumDebugLocations(0) {}
+ DebugLocTracker() : NumDebugLocations(0) {}
~DebugLocTracker() {
- NumFilenames = 0;
- DebugFilenames.clear();
- DebugFilenamesMap.clear();
DebugLocations.clear();
DebugIdMap.clear();
}
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h
index 1397b84677..4fa70fca6f 100644
--- a/include/llvm/CodeGen/MachineFunction.h
+++ b/include/llvm/CodeGen/MachineFunction.h
@@ -312,9 +312,9 @@ public:
//
/// lookUpDebugLocId - Look up the DebugLocTuple index with the given
- /// filename, line, and column. It may add a new filename and / or
+ /// source file, line, and column. It may add a new filename and / or
/// a new DebugLocTuple.
- unsigned lookUpDebugLocId(const char *Filename, unsigned Line, unsigned Col);
+ unsigned lookUpDebugLocId(unsigned Src, unsigned Line, unsigned Col);
};
//===--------------------------------------------------------------------===//