summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-05-21 17:00:40 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-05-21 17:00:40 +0000
commite2fdf8d60e552869c3ee37104204ec3e67347df2 (patch)
tree4e11c9c97885cefb09395c8a063d4697991ba5f9 /llvm/lib/MC/MCContext.cpp
parente07467901bd01aab87614890ef240e19f4ff3f4b (diff)
downloadbcm5719-llvm-e2fdf8d60e552869c3ee37104204ec3e67347df2.tar.gz
bcm5719-llvm-e2fdf8d60e552869c3ee37104204ec3e67347df2.zip
Avoid unnecessary section switching. NFC.
llvm-svn: 237913
Diffstat (limited to 'llvm/lib/MC/MCContext.cpp')
-rw-r--r--llvm/lib/MC/MCContext.cpp3
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();
OpenPOWER on IntegriCloud