Use LLVM_STATIC_ASSERT rather than a hand-rolled implementation.
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 2 Jan 2014 18:29:40 +0000 (18:29 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 2 Jan 2014 18:29:40 +0000 (18:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198330 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/IR/ValueMapTest.cpp

index ffbe6615282e138861e2fea8b9ba0aef2dbe98d9..5493e3e1e39d134b81fdaaf7aee8f2fdbfefeef7 100644 (file)
@@ -117,8 +117,8 @@ TYPED_TEST(ValueMapTest, OperationsWork) {
 
 template<typename ExpectedType, typename VarType>
 void CompileAssertHasType(VarType) {
-  LLVM_ATTRIBUTE_UNUSED typedef char
-  NOT_SAME[is_same<ExpectedType, VarType>::value ? 1 : -1];
+  LLVM_STATIC_ASSERT((is_same<ExpectedType, VarType>::value),
+                     "Not the same type");
 }
 
 TYPED_TEST(ValueMapTest, Iteration) {