[compiler-rt] [rtsan][compiler-rt] Get rid of [[blocking]] stub in tests (PR #111392)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 7 09:45:30 PDT 2024


================
@@ -7,18 +7,11 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-// TODO: Remove when [[blocking]] is implemented.
-extern "C" void __rtsan_notify_blocking_call(const char *function_name);
-
-void custom_blocking_function() {
-  // TODO: When [[blocking]] is implemented, don't call this directly.
-  __rtsan_notify_blocking_call(__func__);
+void custom_blocking_function() [[clang::blocking]] {
+  printf("In blocking function\n");
 }
 
-void safe_call() {
-  // TODO: When [[blocking]] is implemented, don't call this directly.
-  __rtsan_notify_blocking_call(__func__);
-}
+void safe_call() [[clang::blocking]] { printf("In safe call\n"); }
----------------
cjappl wrote:

This call is to test that [[blocking]] called from an un-attributed setting (main) does not result in any error. Happy to take suggestions on how to make this more clear!

https://github.com/llvm/llvm-project/pull/111392


More information about the llvm-commits mailing list