[LoongArch] Support when the depth of __builtin_frame_address is greater than zero
authorgonglingqin <gonglingqin@loongson.cn>
Tue, 22 Nov 2022 07:23:49 +0000 (15:23 +0800)
committergonglingqin <gonglingqin@loongson.cn>
Tue, 22 Nov 2022 07:29:29 +0000 (15:29 +0800)
commit801c77bbfabed0f5f47b3704dee8b401f4009734
treebf859d0fa715eabf26318e2bebe3ab06b55c8fdd
parent375323fb850a0e23df666641f93231fc28ce40ca
[LoongArch] Support when the depth of __builtin_frame_address is greater than zero

As discussed in D137541, it supports processing when the depth of
__builtin_frame_address is greater than 0 instead of reporting an error.
Unsafe calls rely on the '-Wframe-address' option for diagnosis.

Differential Revision: https://reviews.llvm.org/D138084
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/test/CodeGen/LoongArch/frameaddr-returnaddr-error.ll
llvm/test/CodeGen/LoongArch/frameaddr-returnaddr.ll