We'll set it back to true in emitPrologue if it gets called. It doesn't
get called for naked functions.
Fixes PR32912
llvm-svn: 302092
void X86FrameLowering::processFunctionBeforeFrameFinalized(
MachineFunction &MF, RegScavenger *RS) const {
+ // Mark the function as not having WinCFI. We will set it back to true in
+ // emitPrologue if it gets called and emits CFI.
+ MF.setHasWinCFI(false);
+
// If this function isn't doing Win64-style C++ EH, we don't need to do
// anything.
const Function *Fn = MF.getFunction();
; and no unwind info in the object file.
; READOBJ-NOT: leaf_func
}
+
+define void @naked_func() naked {
+ call void asm sideeffect "ret", ""()
+ unreachable
+}
+; ASM-LABEL: naked_func:
+; ASM-NOT: .seh_
+; ASM: ret
+; ASM-NOT: .seh_