llvm-project
c3efe7d6 - [libcxx] [test] Fix odr_signature tests with optimizations enabled (#144317)

Commit
142 days ago
[libcxx] [test] Fix odr_signature tests with optimizations enabled (#144317) If optimization is enabled, the inline `f()` function actually gets inlined, meaning that the functions `tu1()` and `tu2()` trivially return 1 and 2, instead of actually referencing the potentially linker deduplicated function `f()`, which is what the test tries to test. Therefore, this test previously actually failed to test what it was supposed to test, if optimization was enabled. Mark the inline functions with `TEST_NOINLINE` to make sure that they don't get inlined even with optimizations enabled. Also update the TODO comments to explain why we have an XFAIL for msvc mode here. This avoids these tests unexpectedly passing if building in msvc mode, with optimizations enabled (`-DLIBCXX_TEST_PARAMS="optimization=speed"`).
Author
Parents
Loading