blob: 487707a0a8fa39ea1bdb2426e4f8fbc3688034ca [file] [log] [blame]
// Prevents the compiler from optimizing everything away.
template <class T> void DoNotOptimize(const T &var) {
asm volatile("" : "+m"(const_cast<T &>(var)));
}