brintos

brintos / llvm-project-archived public Read only

0
0
Text · 163 B · 487707a Raw
5 lines · c
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