summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-10 21:35:16 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-10 21:35:16 +0000
commitceb96a4cb8eb7ac5e0fefb7f39c54d537a407113 (patch)
tree595934df3f21be5cc7ad80611a3bc8ab3ab6bc01 /llvm
parentfe2f1f095fa7596e8e8dfb778153fa7aebcba672 (diff)
downloadbcm5719-llvm-ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113.tar.gz
bcm5719-llvm-ceb96a4cb8eb7ac5e0fefb7f39c54d537a407113.zip
Move a non-trivial virtual function out of line.
llvm-svn: 231853
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/MC/MCStreamer.h14
-rw-r--r--llvm/lib/MC/MCStreamer.cpp11
2 files changed, 14 insertions, 11 deletions
diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h
index f0be77f70a7..e65a40e8647 100644
--- a/llvm/include/llvm/MC/MCStreamer.h
+++ b/llvm/include/llvm/MC/MCStreamer.h
@@ -344,20 +344,12 @@ public:
return true;
}
- /// SwitchSection - Set the current section where code is being emitted to
- /// @p Section. This is required to update CurSection.
+ /// Set the current section where code is being emitted to @p Section. This
+ /// is required to update CurSection.
///
/// This corresponds to assembler directives like .section, .text, etc.
virtual void SwitchSection(const MCSection *Section,
- const MCExpr *Subsection = nullptr) {
- 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);
- }
- }
+ const MCExpr *Subsection = nullptr);
/// SwitchSectionNoChange - Set the current section where code is being
/// emitted to @p Section. This is required to update CurSection. This
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index f11ee669b4b..d5277ffbd10 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);
+ }
+}
OpenPOWER on IntegriCloud