aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-01-26 07:53:42 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-01-26 07:53:42 +0000
commit4e6871da0995ff3d50e0b49f8b2009d171511772 (patch)
tree8c9e11adef0be81163d6266c928ca56a99c37d32 /llvm/lib/CodeGen/MachineFunction.cpp
parentb5706c45fa2ec5e9e35922b68da34c7755f59ac8 (diff)
downloadllvm-4e6871da0995ff3d50e0b49f8b2009d171511772.zip
llvm-4e6871da0995ff3d50e0b49f8b2009d171511772.tar.gz
llvm-4e6871da0995ff3d50e0b49f8b2009d171511772.tar.bz2
Actually source file has already been uniquified into an id during isel. Eliminate the StringMap.
llvm-svn: 63009
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 0d442af..c1ab9af 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -379,23 +379,11 @@ MachineFunction& MachineFunction::get(const Function *F)
}
/// 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 MachineFunction::lookUpDebugLocId(const char *Filename, unsigned Line,
+unsigned MachineFunction::lookUpDebugLocId(unsigned Src, unsigned Line,
unsigned Col) {
- unsigned FileId;
- StringMap<unsigned>::iterator I =
- DebugLocInfo.DebugFilenamesMap.find(Filename);
- if (I != DebugLocInfo.DebugFilenamesMap.end())
- FileId = I->second;
- else {
- // Add a new filename.
- FileId = DebugLocInfo.NumFilenames++;
- DebugLocInfo.DebugFilenames.push_back(Filename);
- DebugLocInfo.DebugFilenamesMap[Filename] = FileId;
- }
-
- struct DebugLocTuple Tuple(FileId, Line, Col);
+ struct DebugLocTuple Tuple(Src, Line, Col);
DebugIdMapType::iterator II = DebugLocInfo.DebugIdMap.find(Tuple);
if (II != DebugLocInfo.DebugIdMap.end())
return II->second;