summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/AArch64InstrInfo.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2017-04-21 20:58:12 +0000
committerHans Wennborg <hans@hanshq.net>2017-04-21 20:58:12 +0000
commitfe76aaa6eee570fd08f3e975375216b9d6d1bc4a (patch)
tree07151e40c3cdcf71fdc74204a028d4dce31d82a4 /lib/Target/AArch64/AArch64InstrInfo.h
parent9044c52d5694868349980687acf5b94e20e8f10c (diff)
X86: Don't emit zero-byte functions on Windows
Empty functions can lead to duplicate entries in the Guard CF Function Table of a binary due to multiple functions sharing the same RVA, causing the kernel to refuse to load that binary. We had a terrific bug due to this in Chromium. It turns out we were already doing this for Mach-O in certain situations. This patch expands the code for that in AsmPrinter::EmitFunctionBody() and renames TargetInstrInfo::getNoopForMachoTarget() to simply getNoop() since it seems it was used for not just Mach-O anyway. Differential Revision: https://reviews.llvm.org/D32330 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301040 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64InstrInfo.h')
-rw-r--r--lib/Target/AArch64/AArch64InstrInfo.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/AArch64/AArch64InstrInfo.h b/lib/Target/AArch64/AArch64InstrInfo.h
index bacce441f6c..4cd14db633b 100644
--- a/lib/Target/AArch64/AArch64InstrInfo.h
+++ b/lib/Target/AArch64/AArch64InstrInfo.h
@@ -205,7 +205,7 @@ public:
const DebugLoc &DL, unsigned DstReg,
ArrayRef<MachineOperand> Cond, unsigned TrueReg,
unsigned FalseReg) const override;
- void getNoopForMachoTarget(MCInst &NopInst) const override;
+ void getNoop(MCInst &NopInst) const override;
/// analyzeCompare - For a comparison instruction, return the source registers
/// in SrcReg and SrcReg2, and the value it compares against in CmpValue.