mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 16:37:42 +00:00
[MC] Simplify code. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238676 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a651b2236f
commit
d79915c6fe
@ -447,13 +447,8 @@ bool MCContext::isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID) {
|
||||
/// Remove empty sections from SectionStartEndSyms, to avoid generating
|
||||
/// useless debug info for them.
|
||||
void MCContext::finalizeDwarfSections(MCStreamer &MCOS) {
|
||||
std::vector<MCSection *> Keep;
|
||||
for (MCSection *Sec : SectionsForRanges) {
|
||||
if (MCOS.mayHaveInstructions(*Sec))
|
||||
Keep.push_back(Sec);
|
||||
}
|
||||
SectionsForRanges.clear();
|
||||
SectionsForRanges.insert(Keep.begin(), Keep.end());
|
||||
SectionsForRanges.remove_if(
|
||||
[&](MCSection *Sec) { return !MCOS.mayHaveInstructions(*Sec); });
|
||||
}
|
||||
|
||||
void MCContext::reportFatalError(SMLoc Loc, const Twine &Msg) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user