PECOFF: Make FileCOFF:findAtomAt from O(n) to O(1).
authorRui Ueyama <ruiu@google.com>
Mon, 16 Mar 2015 23:43:11 +0000 (23:43 +0000)
committerRui Ueyama <ruiu@google.com>
Mon, 16 Mar 2015 23:43:11 +0000 (23:43 +0000)
commit3c2e306a5c2083c09c7ad6b6963dcc14eae218fb
treed74885d2fc88ca4b248e862ab81f0c7de8086457
parentad0bdcd2380a09c7dac5ef9748fc20d9cba3e319
PECOFF: Make FileCOFF:findAtomAt from O(n) to O(1).

I knew I cut corners when I wrote this. Turned out that it is
actually slow when a file being read has many symbols. This patch
is to stop doing linear search and instead do map lookup.

llvm-svn: 232436
lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp