diff --git a/bolt/include/bolt/Core/DebugData.h b/bolt/include/bolt/Core/DebugData.h index d4611e8f6ca4..3fdc0534c000 100644 --- a/bolt/include/bolt/Core/DebugData.h +++ b/bolt/include/bolt/Core/DebugData.h @@ -313,9 +313,6 @@ public: /// 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 index 28b3977c6edc..8d24c9281b8f 100644 --- a/bolt/lib/Core/DebugData.cpp +++ b/bolt/lib/Core/DebugData.cpp @@ -414,25 +414,6 @@ uint32_t DebugAddrWriter::getIndexFromAddress(uint64_t Address, DWARFUnit &CU) { 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);