mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
Simplify address pool index assignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206905 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -257,9 +257,7 @@ unsigned DwarfFile::getStringPoolIndex(StringRef Str) {
|
||||
|
||||
unsigned DwarfFile::getAddrPoolIndex(const MCSymbol *Sym, bool TLS) {
|
||||
std::pair<AddrPool::iterator, bool> P = AddressPool.insert(
|
||||
std::make_pair(Sym, AddressPoolEntry(NextAddrPoolNumber, TLS)));
|
||||
if (P.second)
|
||||
++NextAddrPoolNumber;
|
||||
std::make_pair(Sym, AddressPoolEntry(AddressPool.size(), TLS)));
|
||||
return P.first->second.Number;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user