[llvm] r199922 - Suppress an annoying "unused variable" warning caused by bug 17897.

Rui Ueyama ruiu at google.com
Thu Jan 23 11:01:25 PST 2014


Author: ruiu
Date: Thu Jan 23 13:01:25 2014
New Revision: 199922

URL: http://llvm.org/viewvc/llvm-project?rev=199922&view=rev
Log:
Suppress an annoying "unused variable" warning caused by bug 17897.

Clang says that "flow" is unused when building LLD. This patch suppresses it.

Differential Revision: http://llvm-reviews.chandlerc.com/D2573

Modified:
    llvm/trunk/include/llvm/Support/YAMLTraits.h

Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=199922&r1=199921&r2=199922&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Thu Jan 23 13:01:25 2014
@@ -1123,6 +1123,7 @@ operator<<(Output &yout, T &seq) {
         return seq.size();                                                  \
       }                                                                     \
       static _type& element(IO &io, std::vector<_type> &seq, size_t index) {\
+        (void)flow; /* Remove this workaround after PR17897 is fixed */     \
         if ( index >= seq.size() )                                          \
           seq.resize(index+1);                                              \
         return seq[index];                                                  \





More information about the llvm-commits mailing list