mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
include/sys/cdefs.h: Add __attribute_optimization_barrier__
Add __attribute_optimization_barrier__ to disable inlining and cloning on a function. For Clang, expand it to __attribute__ ((optnone)) Otherwise, expand it to __attribute__ ((noinline, clone)) Co-Authored-By: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
H.J. Lu
parent
3fb895ac88
commit
a2b0ff98a0
@ -97,7 +97,7 @@ static const unsigned char test_pattern[16] =
|
||||
|
||||
static ucontext_t uc_main, uc_co;
|
||||
|
||||
static __attribute__ ((noinline, noclone)) int
|
||||
static __attribute_optimization_barrier__ int
|
||||
use_test_buffer (unsigned char *buf)
|
||||
{
|
||||
unsigned int sum = 0;
|
||||
|
Reference in New Issue
Block a user