diff options
author | Fangrui Song <i@maskray.me> | 2025-07-26 15:42:05 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-07-26 15:42:05 -0700 |
commit | 87c73f498d3e98c7b6471f81e25b7e08106053fe (patch) | |
tree | dd5b18813998c1ce2ddf56837e06fa55a8e767f5 /llvm/lib/MC/MCStreamer.cpp | |
parent | 57c78998a03a740cf90e8c8fe310633a99e6b53e (diff) | |
download | llvm-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.cpp | 11 |
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) { |