[Sanitizer] Fix sanitizer tests without reducing optimization levels
authorJulian Lettner <julian.lettner@apple.com>
Tue, 9 Feb 2021 18:01:54 +0000 (10:01 -0800)
committerJulian Lettner <julian.lettner@apple.com>
Thu, 11 Feb 2021 23:22:20 +0000 (15:22 -0800)
commit9360f1a1911edee4c6f4c7d070bdaa1ca26016cc
treecde66ff7e3c0161dee8a3f9e36d93fbec8f3b878
parenta48bee2294b608f5c530f783757692eb2ca44100
[Sanitizer] Fix sanitizer tests without reducing optimization levels

As discussed, these tests are compiled with optimization to mimic real
sanitizer usage [1].

Let's mark relevant functions with `noinline` so we can continue to
check against the stack traces in the report.

[1] https://reviews.llvm.org/D96198

This reverts commit 04af72c5423eb5ff7c0deba2d08cb46d583bb9d4.

Differential Revision: https://reviews.llvm.org/D96357
compiler-rt/test/tsan/blacklist2.cpp
compiler-rt/test/tsan/free_race.c
compiler-rt/test/tsan/longjmp3.cpp
compiler-rt/test/tsan/longjmp4.cpp
compiler-rt/test/tsan/race_on_heap.cpp
compiler-rt/test/tsan/race_top_suppression.cpp
compiler-rt/test/tsan/simple_stack.c
compiler-rt/test/tsan/sleep_sync.cpp
compiler-rt/test/ubsan/TestCases/Misc/missing_return.cpp