diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-25 02:35:56 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-25 02:35:56 +0000 |
commit | 6b9ee9bce3abd48f42cbd41e34b08373384f0a59 (patch) | |
tree | ed63bd9dc42ffe743702c2ce088c0f7328a2b475 /llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | |
parent | 8150e14190056cab3b48c78c69fc66a483cb2557 (diff) | |
download | bcm5719-llvm-6b9ee9bce3abd48f42cbd41e34b08373384f0a59.tar.gz bcm5719-llvm-6b9ee9bce3abd48f42cbd41e34b08373384f0a59.zip |
Remove an easy use of EmitRawText from PPC.
This makes lib/Target/PowerPC EmitRawText free.
llvm-svn: 200065
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp index 15480d5219a..786c4f9a334 100644 --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -850,13 +850,12 @@ void PPCDarwinAsmPrinter::EmitStartOfAsmFile(Module &M) { if (Subtarget.isPPC64() && Directive < PPC::DIR_64) Directive = PPC::DIR_64; assert(Directive <= PPC::DIR_64 && "Directive out of range."); - - // FIXME: This is a total hack, finish mc'izing the PPC backend. - if (OutStreamer.hasRawTextSupport()) { - assert(Directive < array_lengthof(CPUDirectives) && - "CPUDirectives[] might not be up-to-date!"); - OutStreamer.EmitRawText("\t.machine " + Twine(CPUDirectives[Directive])); - } + + assert(Directive < array_lengthof(CPUDirectives) && + "CPUDirectives[] might not be up-to-date!"); + PPCTargetStreamer &TStreamer = + *static_cast<PPCTargetStreamer *>(OutStreamer.getTargetStreamer()); + TStreamer.emitMachine(CPUDirectives[Directive]); // Prime text sections so they are adjacent. This reduces the likelihood a // large data or debug section causes a branch to exceed 16M limit. |