[compiler-rt] e522fe1 - [compiler-rt] Always use INTERCEPTOR()+ALIAS()+WRAP() to create interceptor alias

Marco Elver via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 02:58:15 PDT 2023


Author: Marco Elver
Date: 2023-05-24T11:57:18+02:00
New Revision: e522fe1ebe30f8d760097647e04646322cc0cdf1

URL: https://github.com/llvm/llvm-project/commit/e522fe1ebe30f8d760097647e04646322cc0cdf1
DIFF: https://github.com/llvm/llvm-project/commit/e522fe1ebe30f8d760097647e04646322cc0cdf1.diff

LOG: [compiler-rt] Always use INTERCEPTOR()+ALIAS()+WRAP() to create interceptor alias

Do not open code creation of an interceptor alias to another
interceptor. Instead, use INTERCEPTOR() + ALIAS() + WRAP.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D151219

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
index f1af74400fbc..db090d2d8fa2 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
@@ -5487,9 +5487,7 @@ INTERCEPTOR(void *, __tls_get_addr, void *arg) {
 // On PowerPC, we also need to intercept __tls_get_addr_opt, which has
 // mostly the same semantics as __tls_get_addr, but its presence enables
 // some optimizations in linker (which are safe to ignore here).
-extern "C" __attribute__((alias("__interceptor___tls_get_addr"),
-                          visibility("default")))
-void *__tls_get_addr_opt(void *arg);
+INTERCEPTOR(void *, __tls_get_addr_opt, void *arg) ALIAS(WRAP(__tls_get_addr));
 #endif
 #else // SANITIZER_S390
 // On s390, we have to intercept two functions here:


        


More information about the llvm-commits mailing list