Fix missing used attribute for inline assembly variables
authorThomas Köppe <tkoeppe-at-google.com@ffmpeg.org>
Sun, 12 Nov 2017 16:24:37 +0000 (16:24 +0000)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 13 Nov 2017 02:58:34 +0000 (03:58 +0100)
commit43171a2a738f5114768d34a7278e56e5fde714bc
tree1a62d32327c279e9303a50e55a13416f3e102923
parent1828c549c3ecd45d54ff03aee784b00a41f0e69e
Fix missing used attribute for inline assembly variables

Variables used in inline assembly need to be marked with attribute((used)).
Static constants already were, via the define of DECLARE_ASM_CONST.
But DECLARE_ALIGNED does not add this attribute, and some of the variables
defined with it are const only used in inline assembly, and therefore
appeared dead. This change adds a macro DECLARE_ASM_ALIGNED that marks
variables as used.

This change makes FFMPEG work with Clang's ThinLTO.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cabac.c
libavcodec/x86/constants.c
libavutil/mem.h
libswscale/x86/swscale.c