mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-27 07:12:06 +00:00
Use getSize instead of data().size(). NFC.
Also assert isFinalized in getSize(). This just reduces the noise from another patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
420bc5679c
commit
1c287c05a6
@ -61,7 +61,7 @@ public:
|
||||
return StringIndexMap;
|
||||
}
|
||||
|
||||
size_t getSize() const { return Size; }
|
||||
size_t getSize() const;
|
||||
void clear();
|
||||
|
||||
private:
|
||||
|
@ -882,7 +882,7 @@ void MachObjectWriter::writeObject(MCAssembler &Asm,
|
||||
sizeof(MachO::nlist_64) :
|
||||
sizeof(MachO::nlist));
|
||||
writeSymtabLoadCommand(SymbolTableOffset, NumSymTabSymbols,
|
||||
StringTableOffset, StringTable.data().size());
|
||||
StringTableOffset, StringTable.getSize());
|
||||
|
||||
writeDysymtabLoadCommand(FirstLocalSymbol, NumLocalSymbols,
|
||||
FirstExternalSymbol, NumExternalSymbols,
|
||||
|
@ -34,6 +34,11 @@ StringTableBuilder::StringTableBuilder(Kind K, unsigned Alignment)
|
||||
}
|
||||
}
|
||||
|
||||
size_t StringTableBuilder::getSize() const {
|
||||
assert(isFinalized());
|
||||
return Size;
|
||||
}
|
||||
|
||||
typedef std::pair<CachedHash<StringRef>, size_t> StringPair;
|
||||
|
||||
// Returns the character at Pos from end of a string.
|
||||
|
@ -307,7 +307,7 @@ void ELFState<ELFT>::initStrtabSectionHeader(Elf_Shdr &SHeader, StringRef Name,
|
||||
SHeader.sh_type = ELF::SHT_STRTAB;
|
||||
CBA.getOSAndAlignedOffset(SHeader.sh_offset, SHeader.sh_addralign)
|
||||
<< STB.data();
|
||||
SHeader.sh_size = STB.data().size();
|
||||
SHeader.sh_size = STB.getSize();
|
||||
SHeader.sh_addralign = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user