]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg Base.h: Delete prototype for __builtin_return_address
authorJessica Clarke <jrtc27@jrtc27.com>
Mon, 27 Jul 2020 01:58:50 +0000 (09:58 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 28 Jul 2020 00:28:14 +0000 (00:28 +0000)
commita44f558a84c67cd88b8215d4c076123cf58438f4
tree930076b77e838e1f90ceeb8eb0b1daacd242ebc7
parent6074f57e5b19c4cfd45a139b793191f34fa31781
MdePkg Base.h: Delete prototype for __builtin_return_address

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1004

Being a compiler builtin, the type of __builtin_return_address is
already known to the compiler so no prototype is needed. Clang also
errors out when redeclaring certain builtins like this[1], though
currently only for ones with custom type checking. At the moment,
__builtin_return_address does not use custom type checking and so does
not trigger this error, however, the CHERI fork of LLVM, which will form
the basis of the toolchain for Arm's experimental Morello platform, does
use custom type checking for it, and so gives an error. Thus, simply
delete the unnecessary line.

[1] llvm/llvm-project@41af97137572ad6d4dafc872e7ecf6bbb08d4984

Cc: Leif Lindholm <leif@nuviainc.com>
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
MdePkg/Include/Base.h