[test] Name the local variable in the C1XX implementation of DoNotOptmize
Differential Revision: https://reviews.llvm.org/D32510 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -209,7 +209,8 @@ inline void DoNotOptimize(Tp const& value) {
|
|||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
template <class Tp>
|
template <class Tp>
|
||||||
inline void DoNotOptimize(Tp const& value) {
|
inline void DoNotOptimize(Tp const& value) {
|
||||||
const volatile void* volatile = __builtin_addressof(value);
|
const volatile void* volatile unused = __builtin_addressof(value);
|
||||||
|
static_cast<void>(unused);
|
||||||
_ReadWriteBarrier();
|
_ReadWriteBarrier();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user