-Wdeprecated: Remove some dead code that was relying on a questionable (rule-of-3-violating) copy ctor in MCInstPrinter

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244133 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie 2015-08-05 21:15:48 +00:00
parent 452b1451b3
commit cea26c272b
2 changed files with 0 additions and 49 deletions

View File

@ -28,47 +28,6 @@ using namespace llvm;
#define GET_INSTRUCTION_NAME
#include "HexagonGenAsmWriter.inc"
HexagonAsmInstPrinter::HexagonAsmInstPrinter(MCInstPrinter *RawPrinter)
: MCInstPrinter(*RawPrinter), RawPrinter(RawPrinter) {}
void HexagonAsmInstPrinter::printInst(MCInst const *MI, raw_ostream &O,
StringRef Annot,
MCSubtargetInfo const &STI) {
assert(HexagonMCInstrInfo::isBundle(*MI));
assert(HexagonMCInstrInfo::bundleSize(*MI) <= HEXAGON_PACKET_SIZE);
std::string Buffer;
{
raw_string_ostream TempStream(Buffer);
RawPrinter->printInst(MI, TempStream, "", STI);
}
StringRef Contents(Buffer);
auto PacketBundle = Contents.rsplit('\n');
auto HeadTail = PacketBundle.first.split('\n');
auto Preamble = "\t{\n\t\t";
auto Separator = "";
while(!HeadTail.first.empty()) {
O << Separator;
StringRef Inst;
auto Duplex = HeadTail.first.split('\v');
if(!Duplex.second.empty()){
O << Duplex.first << "\n";
Inst = Duplex.second;
}
else
Inst = Duplex.first;
O << Preamble;
O << Inst;
HeadTail = HeadTail.second.split('\n');
Preamble = "";
Separator = "\n\t\t";
}
O << "\n\t}" << PacketBundle.second;
}
void HexagonAsmInstPrinter::printRegName(raw_ostream &O, unsigned RegNo) const {
RawPrinter->printRegName(O, RegNo);
}
// Return the minimum value that a constant extendable operand can have
// without being extended.
static int getMinValue(uint64_t TSFlags) {

View File

@ -18,14 +18,6 @@
#include "llvm/MC/MCInstrInfo.h"
namespace llvm {
class HexagonAsmInstPrinter : public MCInstPrinter {
public:
HexagonAsmInstPrinter(MCInstPrinter *RawPrinter);
void printInst(MCInst const *MI, raw_ostream &O, StringRef Annot,
MCSubtargetInfo const &STI) override;
void printRegName(raw_ostream &O, unsigned RegNo) const override;
std::unique_ptr<MCInstPrinter> RawPrinter;
};
/// Prints bundles as a newline separated list of individual instructions
/// Duplexes are separated by a vertical tab \v character
/// A trailing line includes bundle properties such as endloop0/1