[llvm] r198273 - Silence g++ 4.9 build issue in unit tests

Alp Toker alp at nuanti.com
Tue Dec 31 22:57:01 PST 2013


Author: alp
Date: Wed Jan  1 00:57:01 2014
New Revision: 198273

URL: http://llvm.org/viewvc/llvm-project?rev=198273&view=rev
Log:
Silence g++ 4.9 build issue in unit tests

Stopgap measure until we can just use static_assert().

Modified:
    llvm/trunk/unittests/IR/ValueMapTest.cpp

Modified: llvm/trunk/unittests/IR/ValueMapTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/IR/ValueMapTest.cpp?rev=198273&r1=198272&r2=198273&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/ValueMapTest.cpp (original)
+++ llvm/trunk/unittests/IR/ValueMapTest.cpp Wed Jan  1 00:57:01 2014
@@ -117,7 +117,8 @@ TYPED_TEST(ValueMapTest, OperationsWork)
 
 template<typename ExpectedType, typename VarType>
 void CompileAssertHasType(VarType) {
-  typedef char assert[is_same<ExpectedType, VarType>::value ? 1 : -1];
+  LLVM_ATTRIBUTE_UNUSED typedef char
+  assert[is_same<ExpectedType, VarType>::value ? 1 : -1];
 }
 
 TYPED_TEST(ValueMapTest, Iteration) {





More information about the llvm-commits mailing list