diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-21 17:00:40 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-05-21 17:00:40 +0000 |
commit | e2fdf8d60e552869c3ee37104204ec3e67347df2 (patch) | |
tree | 4e11c9c97885cefb09395c8a063d4697991ba5f9 /llvm/lib | |
parent | e07467901bd01aab87614890ef240e19f4ff3f4b (diff) | |
download | bcm5719-llvm-e2fdf8d60e552869c3ee37104204ec3e67347df2.tar.gz bcm5719-llvm-e2fdf8d60e552869c3ee37104204ec3e67347df2.zip |
Avoid unnecessary section switching. NFC.
llvm-svn: 237913
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index bbff9b7c6a5..cbc130f6bfa 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -442,8 +442,7 @@ bool MCContext::isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID) { void MCContext::finalizeDwarfSections(MCStreamer &MCOS) { std::vector<const MCSection *> Keep; for (const MCSection *Sec : SectionsForRanges) { - MCOS.SwitchSection(Sec); // FIXME: pass the section to mayHaveInstructions - if (MCOS.mayHaveInstructions()) + if (MCOS.mayHaveInstructions(*Sec)) Keep.push_back(Sec); } SectionsForRanges.clear(); |