[PATCH] D45383: Limit types of builtins that can be redeclared.

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 01:53:12 PDT 2018


arichardson added a comment.

This broke the build of FreeBSD for me due to the declaration of __builtin_return_address(unsigned int) in https://github.com/tianocore/edk2/blob/master/MdePkg/Include/Base.h#L1281:

  In file included from /exports/users/alr48/sources/freebsd-x86/sys/contrib/edk2/Include/Uefi.h:23:
  In file included from /exports/users/alr48/sources/freebsd-x86/sys/contrib/edk2/Include/Uefi/UefiBaseType.h:20:
  /exports/users/alr48/sources/freebsd-x86/sys/contrib/edk2/Include/Base.h:1231:10: error: cannot redeclare builtin function '__builtin_return_address'
    void * __builtin_return_address (unsigned int level);
           ^
  /exports/users/alr48/sources/freebsd-x86/sys/contrib/edk2/Include/Base.h:1231:10: note: '__builtin_return_address' is a builtin with type 'void *(unsigned int)'


Repository:
  rL LLVM

https://reviews.llvm.org/D45383





More information about the llvm-commits mailing list