aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 073857e..162d110 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -2230,10 +2230,6 @@ void PPCLinuxAsmPrinter::emitFunctionBodyEnd() {
void PPCAIXAsmPrinter::emitLinkage(const GlobalValue *GV,
MCSymbol *GVSym) const {
-
- assert(MAI->hasVisibilityOnlyWithLinkage() &&
- "AIX's linkage directives take a visibility setting.");
-
MCSymbolAttr LinkageAttr = MCSA_Invalid;
switch (GV->getLinkage()) {
case GlobalValue::ExternalLinkage:
@@ -3251,9 +3247,15 @@ void PPCAIXAsmPrinter::emitInstruction(const MachineInstr *MI) {
bool PPCAIXAsmPrinter::doFinalization(Module &M) {
// Do streamer related finalization for DWARF.
- if (!MAI->usesDwarfFileAndLocDirectives() && hasDebugInfo())
- OutStreamer->doFinalizationAtSectionEnd(
- OutStreamer->getContext().getObjectFileInfo()->getTextSection());
+ if (hasDebugInfo()) {
+ // Emit section end. This is used to tell the debug line section where the
+ // end is for a text section if we don't use .loc to represent the debug
+ // line.
+ auto *Sec = OutContext.getObjectFileInfo()->getTextSection();
+ OutStreamer->switchSectionNoPrint(Sec);
+ MCSymbol *Sym = Sec->getEndSymbol(OutContext);
+ OutStreamer->emitLabel(Sym);
+ }
for (MCSymbol *Sym : ExtSymSDNodeSymbols)
OutStreamer->emitSymbolAttribute(Sym, MCSA_Extern);