mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-26 05:56:51 +00:00
Add back a fallback case for targets that do not or cannot implement getNoopForMachoTarget().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fdedee296f
commit
374e06bbce
@ -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
Block a user