forked from OSchip/llvm-project
Add back a fallback case for targets that do not or cannot implement getNoopForMachoTarget().
llvm-svn: 217899
This commit is contained in:
parent
1050b57a0b
commit
bfc80a45a7
|
@ -802,7 +802,11 @@ void AsmPrinter::EmitFunctionBody() {
|
|||
MCInst Noop;
|
||||
TM.getSubtargetImpl()->getInstrInfo()->getNoopForMachoTarget(Noop);
|
||||
OutStreamer.AddComment("avoids zero-length function");
|
||||
OutStreamer.EmitInstruction(Noop, getSubtargetInfo());
|
||||
|
||||
// Targets can opt-out of emitting the noop here by leaving the opcode
|
||||
// unspecified.
|
||||
if (Noop.getOpcode())
|
||||
OutStreamer.EmitInstruction(Noop, getSubtargetInfo());
|
||||
}
|
||||
|
||||
const Function *F = MF->getFunction();
|
||||
|
|
Loading…
Reference in New Issue