diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-19 05:49:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-19 05:49:37 +0000 |
commit | 6c2f9e14fdf14d8c1c687c6bd9918183fa7f8a7f (patch) | |
tree | 18396ebe0fb76e50f0d46f9dc21f09ec9d82975f /lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | |
parent | 0a324aa53affc2fbadb95be577d22c9bebb1c29e (diff) |
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/CodeGen/AsmPrinter/OcamlGCPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp b/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp index a87fa9eaf6..af3bbc96e5 100644 --- a/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp @@ -15,13 +15,14 @@ #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/CodeGen/GCMetadataPrinter.h" #include "llvm/Module.h" -#include "llvm/Support/Compiler.h" -#include "llvm/Support/ErrorHandling.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/MC/MCStreamer.h" #include "llvm/Target/TargetAsmInfo.h" #include "llvm/Target/TargetData.h" #include "llvm/Target/TargetLoweringObjectFile.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; namespace { @@ -64,10 +65,10 @@ static void EmitCamlGlobal(const Module &M, raw_ostream &OS, AsmPrinter &AP, void OcamlGCMetadataPrinter::beginAssembly(raw_ostream &OS, AsmPrinter &AP, const TargetAsmInfo &TAI) { - AP.SwitchToSection(AP.getObjFileLowering().getTextSection()); + AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection()); EmitCamlGlobal(getModule(), OS, AP, TAI, "code_begin"); - AP.SwitchToSection(AP.getObjFileLowering().getDataSection()); + AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection()); EmitCamlGlobal(getModule(), OS, AP, TAI, "data_begin"); } @@ -99,16 +100,16 @@ void OcamlGCMetadataPrinter::finishAssembly(raw_ostream &OS, AsmPrinter &AP, AddressAlignLog = 3; } - AP.SwitchToSection(AP.getObjFileLowering().getTextSection()); + AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getTextSection()); EmitCamlGlobal(getModule(), OS, AP, TAI, "code_end"); - AP.SwitchToSection(AP.getObjFileLowering().getDataSection()); + AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection()); EmitCamlGlobal(getModule(), OS, AP, TAI, "data_end"); OS << AddressDirective << 0; // FIXME: Why does ocaml emit this?? AP.EOL(); - AP.SwitchToSection(AP.getObjFileLowering().getDataSection()); + AP.OutStreamer.SwitchSection(AP.getObjFileLowering().getDataSection()); EmitCamlGlobal(getModule(), OS, AP, TAI, "frametable"); for (iterator I = begin(), IE = end(); I != IE; ++I) { |