[llvm] 190fcc2 - MC: Replace MCSection's SV_MachO check with MCContext::IsMachO
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 26 10:09:50 PDT 2025
Author: Fangrui Song
Date: 2025-07-26T10:09:45-07:00
New Revision: 190fcc28af585cb06480b026afd14ed87b18adb8
URL: https://github.com/llvm/llvm-project/commit/190fcc28af585cb06480b026afd14ed87b18adb8
DIFF: https://github.com/llvm/llvm-project/commit/190fcc28af585cb06480b026afd14ed87b18adb8.diff
LOG: MC: Replace MCSection's SV_MachO check with MCContext::IsMachO
Added:
Modified:
llvm/lib/MC/MCAsmStreamer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 7119ef4a2bbcd..05b386c007115 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -1105,7 +1105,7 @@ void MCAsmStreamer::emitZerofill(MCSection *Section, MCSymbol *Symbol,
// Note: a .zerofill directive does not switch sections.
OS << ".zerofill ";
- assert(Section->getVariant() == MCSection::SV_MachO &&
+ assert(getContext().getObjectFileType() == MCContext::IsMachO &&
".zerofill is a Mach-O specific directive");
// This is a mach-o specific directive.
@@ -1130,7 +1130,7 @@ void MCAsmStreamer::emitTBSSSymbol(MCSection *Section, MCSymbol *Symbol,
// Instead of using the Section we'll just use the shortcut.
- assert(Section->getVariant() == MCSection::SV_MachO &&
+ assert(getContext().getObjectFileType() == MCContext::IsMachO &&
".zerofill is a Mach-O specific directive");
// This is a mach-o specific directive and section.
More information about the llvm-commits
mailing list