diff options
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r-- | gcc/ipa-inline.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c index 8924f7eb15f..fb20d3723cc 100644 --- a/gcc/ipa-inline.c +++ b/gcc/ipa-inline.c @@ -117,6 +117,7 @@ along with GCC; see the file COPYING3. If not see #include "auto-profile.h" #include "builtins.h" #include "fibonacci_heap.h" +#include "asan.h" typedef fibonacci_heap <sreal, cgraph_edge> edge_heap_t; typedef fibonacci_node <sreal, cgraph_edge> edge_heap_node_t; @@ -257,17 +258,11 @@ report_inline_failed_reason (struct cgraph_edge *e) static bool sanitize_attrs_match_for_inline_p (const_tree caller, const_tree callee) { - /* Don't care if sanitizer is disabled */ - if (!(flag_sanitize & SANITIZE_ADDRESS)) - return true; - if (!caller || !callee) return true; - return !!lookup_attribute ("no_sanitize_address", - DECL_ATTRIBUTES (caller)) == - !!lookup_attribute ("no_sanitize_address", - DECL_ATTRIBUTES (callee)); + return sanitize_flags_p (SANITIZE_ADDRESS, caller) + == sanitize_flags_p (SANITIZE_ADDRESS, callee); } /* Used for flags where it is safe to inline when caller's value is |