diff --git a/bolt/include/bolt/Core/DebugData.h b/bolt/include/bolt/Core/DebugData.h --- a/bolt/include/bolt/Core/DebugData.h +++ b/bolt/include/bolt/Core/DebugData.h @@ -313,9 +313,6 @@ /// Adds Address to map. uint32_t getIndexFromAddress(uint64_t Address, DWARFUnit &CU); - /// Adds {\p Address, \p Index} to \p CU. - void addIndexAddress(uint64_t Address, uint32_t Index, DWARFUnit &CU); - /// Write out entries in to .debug_addr section for CUs. virtual void update(DIEBuilder &DIEBlder, DWARFUnit &CUs); diff --git a/bolt/lib/Core/DebugData.cpp b/bolt/lib/Core/DebugData.cpp --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -414,25 +414,6 @@ return Entry->second; } -// Case1) Address is not in map insert in to AddresToIndex and IndexToAddres -// Case2) Address is in the map but Index is higher or equal. Need to update -// IndexToAddrss. Case3) Address is in the map but Index is lower. Need to -// update AddressToIndex and IndexToAddress -void DebugAddrWriter::addIndexAddress(uint64_t Address, uint32_t Index, - DWARFUnit &CU) { - std::lock_guard Lock(WriterMutex); - const uint64_t CUID = getCUID(CU); - AddressForDWOCU &Map = AddressMaps[CUID]; - auto Entry = Map.find(Address); - if (Entry != Map.end()) { - if (Entry->second > Index) - Map.updateAddressToIndex(Address, Index); - Map.updateIndexToAddrss(Address, Index); - } else { - Map.insert(Address, Index); - } -} - static void updateAddressBase(DIEBuilder &DIEBlder, DebugAddrWriter &AddrWriter, DWARFUnit &CU, const uint64_t Offset) { DIE *Die = DIEBlder.getUnitDIEbyUnit(CU);