[llvm-branch-commits] [llvm-branch] r202965 - assert an essential size invariant
Gabor Greif
ggreif at gmail.com
Wed Mar 5 03:02:58 PST 2014
Author: ggreif
Date: Wed Mar 5 05:02:58 2014
New Revision: 202965
URL: http://llvm.org/viewvc/llvm-project?rev=202965&view=rev
Log:
assert an essential size invariant
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=202965&r1=202964&r2=202965&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp Wed Mar 5 05:02:58 2014
@@ -164,6 +164,8 @@ 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**));
typedef PrevPointerIntPair<true> T;
ptrdiff_t Done = 0;
while (Done < 17) {
More information about the llvm-branch-commits
mailing list