aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-19 05:49:37 +0000
committerChris Lattner <sabre@nondot.org>2009-08-19 05:49:37 +0000
commit6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f (patch)
tree18396ebe0fb76e50f0d46f9dc21f09ec9d82975f /lib/Target/ARM
parent0a324aa53affc2fbadb95be577d22c9bebb1c29e (diff)
downloadexternal_llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.zip
external_llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.tar.gz
external_llvm-6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f.tar.bz2
eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
index 72fd7e4..3ef3fc5 100644
--- a/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
@@ -28,6 +28,7 @@
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineJumpTableInfo.h"
#include "llvm/MC/MCSectionMachO.h"
+#include "llvm/MC/MCStreamer.h"
#include "llvm/Target/TargetAsmInfo.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
@@ -260,7 +261,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out labels for the function.
const Function *F = MF.getFunction();
- SwitchToSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
+ OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
switch (F->getLinkage()) {
default: llvm_unreachable("Unknown linkage type!");
@@ -1162,7 +1163,7 @@ void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
const MCSection *TheSection =
getObjFileLowering().SectionForGlobal(GVar, Mang, TM);
- SwitchToSection(TheSection);
+ OutStreamer.SwitchSection(TheSection);
// FIXME: get this stuff from section kind flags.
if (C->isNullValue() && !GVar->hasSection() && !GVar->isThreadLocal() &&
@@ -1188,7 +1189,7 @@ void ARMAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {
O << TAI->getCOMMDirective() << name << "," << Size
<< ',' << Align;
} else {
- SwitchToSection(getObjFileLowering().SectionForGlobal(GVar, Mang,TM));
+ OutStreamer.SwitchSection(TheSection);
O << "\t.globl " << name << '\n'
<< TAI->getWeakDefDirective() << name << '\n';
EmitAlignment(Align, GVar);
@@ -1297,7 +1298,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
E = FnStubs.end(); I != E; ++I) {
const FnStubInfo &Info = I->second;
- SwitchToSection(StubSection);
+ OutStreamer.SwitchSection(StubSection);
EmitAlignment(2);
O << "\t.code\t32\n";
@@ -1315,7 +1316,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
O << "-(" << Info.SCV << "+8)";
O << '\n';
- SwitchToSection(LazySymbolPointerSection);
+ OutStreamer.SwitchSection(LazySymbolPointerSection);
O << Info.LazyPtr << ":\n";
O << "\t.indirect_symbol " << I->getKeyData() << "\n";
O << "\t.long\tdyld_stub_binding_helper\n";
@@ -1326,7 +1327,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
// Output non-lazy-pointers for external and common global variables.
if (!GVNonLazyPtrs.empty()) {
// Switch with ".non_lazy_symbol_pointer" directive.
- SwitchToSection(TLOFMacho.getNonLazySymbolPointerSection());
+ OutStreamer.SwitchSection(TLOFMacho.getNonLazySymbolPointerSection());
EmitAlignment(2);
for (StringMap<std::string>::iterator I = GVNonLazyPtrs.begin(),
E = GVNonLazyPtrs.end(); I != E; ++I) {
@@ -1337,7 +1338,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
}
if (!HiddenGVNonLazyPtrs.empty()) {
- SwitchToSection(getObjFileLowering().getDataSection());
+ OutStreamer.SwitchSection(getObjFileLowering().getDataSection());
EmitAlignment(2);
for (StringMap<std::string>::iterator I = HiddenGVNonLazyPtrs.begin(),
E = HiddenGVNonLazyPtrs.end(); I != E; ++I) {