[llvm-branch-commits] [llvm-branch] r215709 - use C++11's static_assert instead of defining my own

Gabor Greif ggreif at gmail.com
Fri Aug 15 06:47:31 PDT 2014


Author: ggreif
Date: Fri Aug 15 08:47:31 2014
New Revision: 215709

URL: http://llvm.org/viewvc/llvm-project?rev=215709&view=rev
Log:
use C++11's static_assert instead of defining my own

Modified:
    llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp

Modified: llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp?rev=215709&r1=215708&r2=215709&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp Fri Aug 15 08:47:31 2014
@@ -164,8 +164,7 @@ Use *Use::initTags<false>(Use * const St
 
 template<>
 Use *Use::initTags<true>(Use * const Start, Use *Stop) {
-# define static_assert(COND) typedef char dummy[(COND) ? 1 : -1]
-  static_assert(sizeof(Use) == 3*sizeof(Use**));
+  static_assert(sizeof(Use) == 3 * sizeof(Use**), "Use should have three pointers");
   typedef PrevPointerIntPair<true> T;
   ptrdiff_t Done = 0;
   while (Done < 17) {





More information about the llvm-branch-commits mailing list