aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2025-07-26 15:42:05 -0700
committerFangrui Song <i@maskray.me>2025-07-26 15:42:05 -0700
commit87c73f498d3e98c7b6471f81e25b7e08106053fe (patch)
treedd5b18813998c1ce2ddf56837e06fa55a8e767f5 /llvm/lib/MC/MCStreamer.cpp
parent57c78998a03a740cf90e8c8fe310633a99e6b53e (diff)
downloadllvm-87c73f498d3e98c7b6471f81e25b7e08106053fe.zip
llvm-87c73f498d3e98c7b6471f81e25b7e08106053fe.tar.gz
llvm-87c73f498d3e98c7b6471f81e25b7e08106053fe.tar.bz2
Move MCSection::printSwitchToSection to MCAsmInfo
This removes the only virtual function of MCSection. NVPTXTargetStreamer::changeSection uses the MCSectionELF print method. Change it to just print the section name.
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCStreamer.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp
index add021b..bc73981 100644
--- a/llvm/lib/MC/MCStreamer.cpp
+++ b/llvm/lib/MC/MCStreamer.cpp
@@ -56,12 +56,11 @@ void MCTargetStreamer::finish() {}
void MCTargetStreamer::emitConstantPools() {}
-void MCTargetStreamer::changeSection(const MCSection *CurSection,
- MCSection *Section, uint32_t Subsection,
- raw_ostream &OS) {
- Section->printSwitchToSection(*Streamer.getContext().getAsmInfo(),
- Streamer.getContext().getTargetTriple(), OS,
- Subsection);
+void MCTargetStreamer::changeSection(const MCSection *, MCSection *Sec,
+ uint32_t Subsection, raw_ostream &OS) {
+ auto &MAI = *Streamer.getContext().getAsmInfo();
+ MAI.printSwitchToSection(*Sec, Subsection,
+ Streamer.getContext().getTargetTriple(), OS);
}
void MCTargetStreamer::emitDwarfFileDirective(StringRef Directive) {