mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +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:
parent
3682fdabef
commit
795e462cc4
@ -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;
|
||||
}
|
||||
|
||||
|
@ -166,12 +166,10 @@ class DwarfFile {
|
||||
// references.
|
||||
typedef DenseMap<const MCSymbol *, AddressPoolEntry> AddrPool;
|
||||
AddrPool AddressPool;
|
||||
unsigned NextAddrPoolNumber;
|
||||
|
||||
public:
|
||||
DwarfFile(AsmPrinter *AP, const char *Pref, BumpPtrAllocator &DA)
|
||||
: Asm(AP), StringPool(DA), NextStringPoolNumber(0), StringPref(Pref),
|
||||
AddressPool(), NextAddrPoolNumber(0) {}
|
||||
: Asm(AP), StringPool(DA), NextStringPoolNumber(0), StringPref(Pref) {}
|
||||
|
||||
~DwarfFile();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user