mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Move code out of a loop and use a range loop.
llvm-svn: 251952
This commit is contained in:
parent
7ec60e8686
commit
9103955acf
@ -619,16 +619,14 @@ void MCELFStreamer::EmitBundleUnlock() {
|
||||
}
|
||||
|
||||
void MCELFStreamer::Flush() {
|
||||
for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(),
|
||||
e = LocalCommons.end();
|
||||
i != e; ++i) {
|
||||
const MCSymbol &Symbol = *i->Symbol;
|
||||
uint64_t Size = i->Size;
|
||||
unsigned ByteAlignment = i->ByteAlignment;
|
||||
MCSection &Section = *getAssembler().getContext().getELFSection(
|
||||
".bss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
|
||||
MCSection &Section = *getAssembler().getContext().getELFSection(
|
||||
".bss", ELF::SHT_NOBITS, ELF::SHF_WRITE | ELF::SHF_ALLOC);
|
||||
getAssembler().registerSection(Section);
|
||||
|
||||
getAssembler().registerSection(Section);
|
||||
for (const LocalCommon &L : LocalCommons) {
|
||||
const MCSymbol &Symbol = *L.Symbol;
|
||||
uint64_t Size = L.Size;
|
||||
unsigned ByteAlignment = L.ByteAlignment;
|
||||
new MCAlignFragment(ByteAlignment, 0, 1, ByteAlignment, &Section);
|
||||
|
||||
MCFragment *F = new MCFillFragment(0, 0, Size, &Section);
|
||||
|
Loading…
Reference in New Issue
Block a user