summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCMachOStreamer.cpp
diff options
context:
space:
mode:
authorRichard Mitton <richard@codersnotes.com>2013-09-19 23:21:01 +0000
committerRichard Mitton <richard@codersnotes.com>2013-09-19 23:21:01 +0000
commit21101b32318647f600584d966c697d8773f59629 (patch)
tree1e34857ba6e750efaf5802334d0beafff5978280 /llvm/lib/MC/MCMachOStreamer.cpp
parent665d3ec3d36ea75844c9cea4ac5fbd17daeeeebc (diff)
downloadbcm5719-llvm-21101b32318647f600584d966c697d8773f59629.tar.gz
bcm5719-llvm-21101b32318647f600584d966c697d8773f59629.zip
Added support for generate DWARF .debug_aranges sections automatically.
llvm-svn: 191052
Diffstat (limited to 'llvm/lib/MC/MCMachOStreamer.cpp')
-rw-r--r--llvm/lib/MC/MCMachOStreamer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp
index e628461f1d6..2c4707f58ce 100644
--- a/llvm/lib/MC/MCMachOStreamer.cpp
+++ b/llvm/lib/MC/MCMachOStreamer.cpp
@@ -123,7 +123,7 @@ void MCMachOStreamer::EmitLabel(MCSymbol *Symbol) {
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
// isSymbolLinkerVisible uses the section.
- Symbol->setSection(*getCurrentSection().first);
+ AssignSection(Symbol, getCurrentSection().first);
// We have to create a new fragment if this is an atom defining symbol,
// fragments cannot span atoms.
if (getAssembler().isSymbolLinkerVisible(*Symbol))
@@ -327,6 +327,8 @@ void MCMachOStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
// FIXME: Darwin 'as' does appear to allow redef of a .comm by itself.
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
+ AssignSection(Symbol, NULL);
+
MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
SD.setExternal(true);
SD.setCommon(Size, ByteAlignment);
@@ -363,7 +365,7 @@ void MCMachOStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
MCFragment *F = new MCFillFragment(0, 0, Size, &SectData);
SD.setFragment(F);
- Symbol->setSection(*Section);
+ AssignSection(Symbol, Section);
// Update the maximum alignment on the zero fill section if necessary.
if (ByteAlignment > SectData.getAlignment())
OpenPOWER on IntegriCloud