1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 18:47:32 -05:00

Work around LLVM bug 34980

Clang generates an internal failure if the same function
has different target attributes in definition and declaration.
To work around that, we made a proxy predeclared function
without target attribute.
This commit is contained in:
Pavel I. Kryukov
2018-02-18 16:48:44 +03:00
committed by Simon Tatham
parent 5d9d075aac
commit f872551cd8
2 changed files with 18 additions and 2 deletions

View File

@ -521,7 +521,7 @@ int supports_sha_ni(void)
https://github.com/noloader/SHA-Intrinsics
*/
FUNC_ISA
static void sha1_ni(SHA_State * s, const unsigned char *q, int len)
static void sha1_ni_(SHA_State * s, const unsigned char *q, int len)
{
if (s->blkused && s->blkused + len < 64) {
/*
@ -725,6 +725,14 @@ static void sha1_ni(SHA_State * s, const unsigned char *q, int len)
}
}
/*
* Workaround LLVM bug https://bugs.llvm.org/show_bug.cgi?id=34980
*/
static void sha1_ni(SHA_State * s, const unsigned char *q, int len)
{
sha1_ni_(s, q, len);
}
#else /* COMPILER_SUPPORTS_AES_NI */
static void sha1_ni(SHA_State * s, const unsigned char *q, int len)