aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/AsmPrinter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/AsmPrinter')
-rw-r--r--lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp14
-rw-r--r--lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp9
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
index ca001d3..1e2a6de 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
@@ -174,7 +174,7 @@ void X86ATTAsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
if (Subtarget->isTargetCygMing())
DecorateCygMingName(CurrentFnName, F);
- SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
+ OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
EmitAlignment(FnAlign, F);
switch (F->getLinkage()) {
@@ -933,7 +933,7 @@ void X86ATTAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GVar, TM);
const MCSection *TheSection =
getObjFileLowering().SectionForGlobal(GVar, GVKind, Mang, TM);
- SwitchToSection(TheSection);
+ OutStreamer.SwitchSection(TheSection);
// FIXME: get this stuff from section kind flags.
if (C->isNullValue() && !GVar->hasSection() &&
@@ -1074,7 +1074,7 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
MCSectionMachO::S_ATTR_SELF_MODIFYING_CODE |
MCSectionMachO::S_ATTR_PURE_INSTRUCTIONS,
5, SectionKind::getMetadata());
- SwitchToSection(TheSection);
+ OutStreamer.SwitchSection(TheSection);
for (StringMap<std::string>::iterator I = FnStubs.begin(),
E = FnStubs.end(); I != E; ++I)
O << I->getKeyData() << ":\n" << "\t.indirect_symbol " << I->second
@@ -1088,7 +1088,7 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
TLOFMacho.getMachOSection("__IMPORT", "__pointers",
MCSectionMachO::S_NON_LAZY_SYMBOL_POINTERS,
SectionKind::getMetadata());
- SwitchToSection(TheSection);
+ OutStreamer.SwitchSection(TheSection);
for (StringMap<std::string>::iterator I = GVStubs.begin(),
E = GVStubs.end(); I != E; ++I)
O << I->getKeyData() << ":\n\t.indirect_symbol "
@@ -1096,7 +1096,7 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
}
if (!HiddenGVStubs.empty()) {
- SwitchToSection(getObjFileLowering().getDataSection());
+ OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
EmitAlignment(2);
for (StringMap<std::string>::iterator I = HiddenGVStubs.begin(),
E = HiddenGVStubs.end(); I != E; ++I)
@@ -1128,8 +1128,8 @@ bool X86ATTAsmPrinter::doFinalization(Module &M) {
TargetLoweringObjectFileCOFF &TLOFMacho =
static_cast<TargetLoweringObjectFileCOFF&>(getObjFileLowering());
- SwitchToSection(TLOFMacho.getCOFFSection(".section .drectve", true,
- SectionKind::getMetadata()));
+ OutStreamer.SwitchSection(TLOFMacho.getCOFFSection(".section .drectve",true,
+ SectionKind::getMetadata()));
for (StringSet<>::iterator i = DLLExportedGVs.begin(),
e = DLLExportedGVs.end(); i != e; ++i)
diff --git a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
index e9c8cd6..141512e 100644
--- a/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
@@ -26,11 +26,12 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/CodeGen/DwarfWriter.h"
-#include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/Mangler.h"
+#include "llvm/MC/MCStreamer.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetOptions.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/Mangler.h"
using namespace llvm;
STATISTIC(EmittedInsts, "Number of machine instrs printed");
@@ -143,7 +144,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
decorateName(CurrentFnName, F);
- SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
+ OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
switch (F->getLinkage()) {
default: llvm_unreachable("Unsupported linkage type!");
@@ -513,7 +514,7 @@ void X86IntelAsmPrinter::PrintGlobalVariable(const GlobalVariable *GV) {
O << "\tpublic " << name << "\n";
// FALL THROUGH
case GlobalValue::InternalLinkage:
- SwitchToSection(getObjFileLowering().getDataSection());
+ OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
break;
default:
llvm_unreachable("Unknown linkage type!");