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

Casey Carter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 09:07:12 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL302162: [test] Name the local variable in the C1XX implementation of DoNotOptmize (authored by CaseyCarter).

Changed prior to commit:
  https://reviews.llvm.org/D32510?vs=96648&id=97837#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32510

Files:
  libcxx/trunk/test/support/test_macros.h


Index: libcxx/trunk/test/support/test_macros.h
===================================================================
--- libcxx/trunk/test/support/test_macros.h
+++ libcxx/trunk/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.97837.patch
Type: text/x-patch
Size: 509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170504/b123bab3/attachment-0001.bin>


More information about the cfe-commits mailing list