mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
[BOLT][DWARF][NFC] Remove addIndexAddress
Removed unused API DebugAddrWriter::addIndexAddress. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D157357
This commit is contained in:
parent
55a1d959a5
commit
43fe9dcb71
@ -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);
|
||||
|
||||
|
@ -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<std::mutex> 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);
|
||||
|
Loading…
Reference in New Issue
Block a user