[llvm] r198330 - Use LLVM_STATIC_ASSERT rather than a hand-rolled implementation.

David Blaikie dblaikie at gmail.com
Thu Jan 2 10:29:40 PST 2014


Author: dblaikie
Date: Thu Jan  2 12:29:40 2014
New Revision: 198330

URL: http://llvm.org/viewvc/llvm-project?rev=198330&view=rev
Log:
Use LLVM_STATIC_ASSERT rather than a hand-rolled implementation.

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=198330&r1=198329&r2=198330&view=diff
==============================================================================
--- llvm/trunk/unittests/IR/ValueMapTest.cpp (original)
+++ llvm/trunk/unittests/IR/ValueMapTest.cpp Thu Jan  2 12:29:40 2014
@@ -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) {





More information about the llvm-commits mailing list