]> git.proxmox.com Git - mirror_edk2.git/commitdiff
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)
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

index 85a091b9d564af20b62101239beb9e1a1a2decd7..8e4271f6eaf5414ad3e3d30290de4f1126f1cef1 100644 (file)
@@ -1273,7 +1273,6 @@ typedef UINTN RETURN_STATUS;
   **/\r
   #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)\r
 #elif defined (__GNUC__) || defined (__clang__)\r
-  void * __builtin_return_address (unsigned int level);\r
   /**\r
     Get the return address of the calling function.\r
 \r