diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-08-21 04:39:52 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2015-08-21 04:39:52 +0000 |
commit | 0d6094b992d800babedb77112e647a388a86a6eb (patch) | |
tree | e9bcf6f10d5dbdbb86443e7ab04563f8ce7c9b86 /compiler-rt/lib/builtins/int_lib.h | |
parent | 667395f334daa1b5161b18c8a6e8171567d22b4b (diff) | |
download | bcm5719-llvm-0d6094b992d800babedb77112e647a388a86a6eb.tar.gz bcm5719-llvm-0d6094b992d800babedb77112e647a388a86a6eb.zip |
builtins: restrict aliases
MachO and COFF do not support aliases. Restrict the alias to ELF targets. This
should also fix the Darwin build. Make the FNALIAS usage an error on non-ELF
targets.
llvm-svn: 245669
Diffstat (limited to 'compiler-rt/lib/builtins/int_lib.h')
-rw-r--r-- | compiler-rt/lib/builtins/int_lib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/builtins/int_lib.h b/compiler-rt/lib/builtins/int_lib.h index 70773e3779b..9a74d1e53fb 100644 --- a/compiler-rt/lib/builtins/int_lib.h +++ b/compiler-rt/lib/builtins/int_lib.h @@ -20,8 +20,12 @@ /* Assumption: Right shift of signed negative is arithmetic shift. */ /* Assumption: Endianness is little or big (not mixed). */ +#if defined(__ELF__) #define FNALIAS(alias_name, original_name) \ void alias_name() __attribute__((alias(#original_name))) +#else +#define FNALIAS(alias, name) _Pragma("GCC error(\"alias unsupported on this file format\")") +#endif /* ABI macro definitions */ |