diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-01-26 07:53:42 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-01-26 07:53:42 +0000 |
commit | c4b1abd81e4de314880110c5d58917d4747fb978 (patch) | |
tree | e85a0d443e61cc9bbba6b47765d5bde47664274b /lib | |
parent | d0adbb5b7da2d1238fdf1a30734a001a0103aab0 (diff) | |
download | external_llvm-c4b1abd81e4de314880110c5d58917d4747fb978.zip external_llvm-c4b1abd81e4de314880110c5d58917d4747fb978.tar.gz external_llvm-c4b1abd81e4de314880110c5d58917d4747fb978.tar.bz2 |
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 'lib')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 0d442af..c1ab9af 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/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; |