diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-03-10 21:35:16 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-03-10 21:35:16 +0000 |
commit | ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113 (patch) | |
tree | 595934df3f21be5cc7ad80611a3bc8ab3ab6bc01 /llvm/lib/MC/MCStreamer.cpp | |
parent | fe2f1f095fa7596e8e8dfb778153fa7aebcba672 (diff) | |
download | llvm-ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113.zip llvm-ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113.tar.gz llvm-ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113.tar.bz2 |
Move a non-trivial virtual function out of line.
llvm-svn: 231853
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index f11ee669..d5277ff 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -661,3 +661,14 @@ void MCStreamer::EmitBundleAlignMode(unsigned AlignPow2) {} void MCStreamer::EmitBundleLock(bool AlignToEnd) {} void MCStreamer::FinishImpl() {} void MCStreamer::EmitBundleUnlock() {} + +void MCStreamer::SwitchSection(const MCSection *Section, + const MCExpr *Subsection) { + assert(Section && "Cannot switch to a null section!"); + MCSectionSubPair curSection = SectionStack.back().first; + SectionStack.back().second = curSection; + if (MCSectionSubPair(Section, Subsection) != curSection) { + SectionStack.back().first = MCSectionSubPair(Section, Subsection); + ChangeSection(Section, Subsection); + } +} |