[PATCH] D32510: [libcxx] Fix C1XX implementation of DoNotOptimize

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 25 16:25:57 PDT 2017


CaseyCarter created this revision.

...in test_macros.h


https://reviews.llvm.org/D32510

Files:
  test/support/test_macros.h


Index: test/support/test_macros.h
===================================================================
--- test/support/test_macros.h
+++ test/support/test_macros.h
@@ -209,7 +209,8 @@
 #include <intrin.h>
 template <class Tp>
 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();
 }
 #endif


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32510.96648.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170425/4edd60cd/attachment.bin>


More information about the cfe-commits mailing list