summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-10 01:39:42 +0000
committerChris Lattner <sabre@nondot.org>2009-08-10 01:39:42 +0000
commitcb307a27bf19ac76eeaf16ec6c8a4a698fad88d1 (patch)
treef4431d664c6fd883c1493ad99946243b89c2f9f5 /llvm/lib/MC/MCAsmStreamer.cpp
parent40268af91e4a8cb2b7d1a90abc5453223fc54547 (diff)
downloadbcm5719-llvm-cb307a27bf19ac76eeaf16ec6c8a4a698fad88d1.tar.gz
bcm5719-llvm-cb307a27bf19ac76eeaf16ec6c8a4a698fad88d1.zip
Make the big switch: Change MCSectionMachO to represent a section *semantically*
instead of syntactically as a string. This means that it keeps track of the segment, section, flags, etc directly and asmprints them in the right format. This also includes parsing and validation support for llvm-mc and "attribute(section)", so we should now start getting errors about invalid section attributes from the compiler instead of the assembler on darwin. Still todo: 1) Uniquing of darwin mcsections 2) Move all the Darwin stuff out to MCSectionMachO.[cpp|h] 3) there are a few FIXMEs, for example what is the syntax to get the S_GB_ZEROFILL segment type? llvm-svn: 78547
Diffstat (limited to 'llvm/lib/MC/MCAsmStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 0aed948d30d..7dcca7bd5c5 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -222,7 +222,9 @@ void MCAsmStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol,
OS << ".zerofill ";
// This is a mach-o specific directive.
- OS << '"' << ((MCSectionMachO*)Section)->getName() << '"';
+ const MCSectionMachO *MOSection = ((const MCSectionMachO*)Section);
+ OS << '"' << MOSection->getSegmentName() << ","
+ << MOSection->getSectionName() << '"';
if (Symbol != NULL) {
OpenPOWER on IntegriCloud