mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Define a runOnMachineFunction for the Hexagon AsmPrinter and
use it to initialize the subtarget. llvm-svn: 227948
This commit is contained in:
parent
2ba773b6bd
commit
a26193de86
@ -63,9 +63,7 @@ static cl::opt<bool> AlignCalls(
|
||||
|
||||
HexagonAsmPrinter::HexagonAsmPrinter(TargetMachine &TM,
|
||||
std::unique_ptr<MCStreamer> Streamer)
|
||||
: AsmPrinter(TM, std::move(Streamer)) {
|
||||
Subtarget = &TM.getSubtarget<HexagonSubtarget>();
|
||||
}
|
||||
: AsmPrinter(TM, std::move(Streamer)), Subtarget(nullptr) {}
|
||||
|
||||
void HexagonAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
|
||||
raw_ostream &O) {
|
||||
|
@ -28,6 +28,11 @@ namespace llvm {
|
||||
explicit HexagonAsmPrinter(TargetMachine &TM,
|
||||
std::unique_ptr<MCStreamer> Streamer);
|
||||
|
||||
bool runOnMachineFunction(MachineFunction &Fn) override {
|
||||
Subtarget = &Fn.getSubtarget<HexagonSubtarget>();
|
||||
return AsmPrinter::runOnMachineFunction(Fn);
|
||||
}
|
||||
|
||||
const char *getPassName() const override {
|
||||
return "Hexagon Assembly Printer";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user