mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-20 01:57:37 +00:00
[BOLT] Use llvm::is_contained (NFC)
This commit is contained in:
parent
9932eb083a
commit
e7541f561d
@ -5999,12 +5999,10 @@ uint64_t RewriteInstance::getFileOffsetForAddress(uint64_t Address) const {
|
||||
}
|
||||
|
||||
bool RewriteInstance::willOverwriteSection(StringRef SectionName) {
|
||||
for (const char *const &OverwriteName : SectionsToOverwrite)
|
||||
if (SectionName == OverwriteName)
|
||||
return true;
|
||||
for (std::string &OverwriteName : DebugSectionsToOverwrite)
|
||||
if (SectionName == OverwriteName)
|
||||
return true;
|
||||
if (llvm::is_contained(SectionsToOverwrite, SectionName))
|
||||
return true;
|
||||
if (llvm::is_contained(DebugSectionsToOverwrite, SectionName))
|
||||
return true;
|
||||
|
||||
ErrorOr<BinarySection &> Section = BC->getUniqueSectionByName(SectionName);
|
||||
return Section && Section->isAllocatable() && Section->isFinalized();
|
||||
|
Loading…
x
Reference in New Issue
Block a user