summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/Thumb2InstrInfo.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
commitcb3e81071495dd2f63af38f6b50945a47939f9d7 (patch)
tree7826b28b7b5818fd416502e8c46a184c8188ce39 /llvm/lib/Target/ARM/Thumb2InstrInfo.h
parent79873efcfb3ae8c4da5f8c6855105a9e496ce1f7 (diff)
downloadbcm5719-llvm-cb3e81071495dd2f63af38f6b50945a47939f9d7.tar.gz
bcm5719-llvm-cb3e81071495dd2f63af38f6b50945a47939f9d7.zip
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 llvm-svn: 301040
Diffstat (limited to 'llvm/lib/Target/ARM/Thumb2InstrInfo.h')
-rw-r--r--llvm/lib/Target/ARM/Thumb2InstrInfo.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/Thumb2InstrInfo.h b/llvm/lib/Target/ARM/Thumb2InstrInfo.h
index 15d63300b6a..c834ba73bfe 100644
--- a/llvm/lib/Target/ARM/Thumb2InstrInfo.h
+++ b/llvm/lib/Target/ARM/Thumb2InstrInfo.h
@@ -26,8 +26,8 @@ class Thumb2InstrInfo : public ARMBaseInstrInfo {
public:
explicit Thumb2InstrInfo(const ARMSubtarget &STI);
- /// getNoopForMachoTarget - Return the noop instruction to use for a noop.
- void getNoopForMachoTarget(MCInst &NopInst) const override;
+ /// Return the noop instruction to use for a noop.
+ void getNoop(MCInst &NopInst) const override;
// Return the non-pre/post incrementing version of 'Opc'. Return 0
// if there is not such an opcode.
OpenPOWER on IntegriCloud