[Object] Avoid repeated hash lookups (NFC) (#127746)
This commit is contained in:
parent
af922cf9f7
commit
1bb72f0d7d
@ -503,8 +503,9 @@ GOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
|
||||
std::copy(CompleteData.data(), CompleteData.data() + TxtDataSize,
|
||||
Data.begin() + TxtDataOffset);
|
||||
}
|
||||
SectionDataCache[Sec.d.a] = Data;
|
||||
return ArrayRef<uint8_t>(SectionDataCache[Sec.d.a]);
|
||||
auto &Cache = SectionDataCache[Sec.d.a];
|
||||
Cache = Data;
|
||||
return ArrayRef<uint8_t>(Cache);
|
||||
}
|
||||
|
||||
uint64_t GOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user