[AArch64] only indicate CFI on Windows if we emitted CFI
authorMandeep Singh Grang <mgrang@quicinc.com>
Wed, 15 May 2019 21:23:41 +0000 (21:23 +0000)
committerMandeep Singh Grang <mgrang@quicinc.com>
Wed, 15 May 2019 21:23:41 +0000 (21:23 +0000)
commit814435fe87412dc3ac1cb0b00d6a3786accb5e0d
treec9e3791c56075008b6069c8f3df2f5faf452f03b
parent439228727a33624fbb7a67c854e5117bbed9a992
[AArch64] only indicate CFI on Windows if we emitted CFI

Summary:
Otherwise, we emit directives for CFI without any actual CFI opcodes to
go with them, which causes tools to malfunction.  The technique is
similar to what the x86 backend already does.

Fixes https://bugs.llvm.org/show_bug.cgi?id=40876

Patch by: froydnj (Nathan Froyd)

Reviewers: mstorsjo, eli.friedman, rnk, mgrang, ssijaric

Reviewed By: rnk

Subscribers: javed.absar, kristof.beyls, llvm-commits, dmajor

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61960

llvm-svn: 360816
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
llvm/lib/Target/AArch64/AArch64InstrInfo.h
llvm/test/CodeGen/AArch64/win64-nocfi.ll [new file with mode: 0644]