mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-19 05:50:46 +00:00
Mark test function as 'weak' to prevent interprocedural CSE.
A recent change to MemorySSA caused LLVM to start optimizing the call to 'f(x)' into just 'x', despite the 'noinline' attribute. So try harder to prevent this optimization from firing.
This commit is contained in:
parent
2669e41b7b
commit
51fab8f36f
@ -9,6 +9,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
__attribute__((noinline))
|
||||
__attribute__((weak))
|
||||
__attribute__((no_sanitize_memory))
|
||||
int f(int x) {
|
||||
return x;
|
||||
|
Loading…
Reference in New Issue
Block a user