Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lld/ELF/Arch/ARM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1317,11 +1317,11 @@ void elf::processArmCmseSymbols(Ctx &ctx) {
// with its corresponding special symbol __acle_se_<sym>.
parallelForEach(ctx.objectFiles, [&](InputFile *file) {
MutableArrayRef<Symbol *> syms = file->getMutableSymbols();
for (size_t i = 0, e = syms.size(); i != e; ++i) {
StringRef symName = syms[i]->getName();
for (Symbol *&sym : syms) {
StringRef symName = sym->getName();
auto it = ctx.symtab->cmseSymMap.find(symName);
if (it != ctx.symtab->cmseSymMap.end())
syms[i] = it->second.acleSeSym;
sym = it->second.acleSeSym;
}
});
}
Expand Down
7 changes: 3 additions & 4 deletions lld/ELF/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4026,10 +4026,9 @@ void MergeNoTailSection::finalizeContents() {
// So far, section pieces have offsets from beginning of shards, but
// we want offsets from beginning of the whole section. Fix them.
parallelForEach(sections, [&](MergeInputSection *sec) {
for (size_t i = 0, e = sec->pieces.size(); i != e; ++i)
if (sec->pieces[i].live)
sec->pieces[i].outputOff +=
shardOffsets[getShardId(sec->pieces[i].hash)];
for (SectionPiece &piece : sec->pieces)
if (piece.live)
piece.outputOff += shardOffsets[getShardId(piece.hash)];
});
}

Expand Down
4 changes: 1 addition & 3 deletions lld/MachO/SyntheticSections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -947,9 +947,7 @@ uint64_t ObjCStubsSection::getSize() const {

void ObjCStubsSection::writeTo(uint8_t *buf) const {
uint64_t stubOffset = 0;
for (size_t i = 0, n = symbols.size(); i < n; ++i) {
Defined *sym = symbols[i];

for (Defined *sym : symbols) {
auto methname = getMethname(sym);
InputSection *selRef = ObjCSelRefsHelper::getSelRef(methname);
assert(selRef != nullptr && "no selref for methname");
Expand Down
6 changes: 3 additions & 3 deletions lld/wasm/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,9 @@ static void wrapSymbols(ArrayRef<WrappedSymbol> wrapped) {
// Update pointers in input files.
parallelForEach(ctx.objectFiles, [&](InputFile *file) {
MutableArrayRef<Symbol *> syms = file->getMutableSymbols();
for (size_t i = 0, e = syms.size(); i != e; ++i)
if (Symbol *s = map.lookup(syms[i]))
syms[i] = s;
for (Symbol *&sym : syms)
if (Symbol *s = map.lookup(sym))
sym = s;
});

// Update pointers in the symbol table.
Expand Down
Loading