From: Julian Lettner Date: Thu, 2 Dec 2021 00:58:36 +0000 (-0800) Subject: [TSan][Darwin] Prevent inlining of functions in tests X-Git-Tag: upstream/15.0.7~24276 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=863b117411d898f5a288f560c48d75bb145d39f6;p=platform%2Fupstream%2Fllvm.git [TSan][Darwin] Prevent inlining of functions in tests Prevent inlining of functions so we can FileCheck the generated stack traces. --- diff --git a/compiler-rt/test/tsan/atexit4.cpp b/compiler-rt/test/tsan/atexit4.cpp index 7102b3a..6126e8c 100644 --- a/compiler-rt/test/tsan/atexit4.cpp +++ b/compiler-rt/test/tsan/atexit4.cpp @@ -17,6 +17,7 @@ static void race() { } struct X { + __attribute__((noinline)) X() { atexit(race); } } x; diff --git a/compiler-rt/test/tsan/atexit5.cpp b/compiler-rt/test/tsan/atexit5.cpp index ef3b385..e24f15d 100644 --- a/compiler-rt/test/tsan/atexit5.cpp +++ b/compiler-rt/test/tsan/atexit5.cpp @@ -1,4 +1,4 @@ -// RUN: %clangxx_tsan -O1 %s -o %t && %deflake %run %t | FileCheck %s +// RUN: %clangxx_tsan -O1 -fno-inline-functions %s -o %t && %deflake %run %t | FileCheck %s #include "test.h" #include