1// Prevents the compiler from optimizing everything away.
2template <class T> void DoNotOptimize(const T &var) {
3 asm volatile("" : "+m"(const_cast<T &>(var)));
4}
5

source code of compiler-rt/test/nsan/helpers.h