From: Dan Gohman Date: Wed, 16 Jul 2008 15:56:42 +0000 (+0000) Subject: Add an assert to check for empty flags for MachineMemOperand. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c5e1f98fdf44993c2bfe4c1ef633b2358cd718c1;p=oota-llvm.git Add an assert to check for empty flags for MachineMemOperand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53680 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 36212ba4d06..595a9149b38 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -246,6 +246,7 @@ MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f, : Offset(o), Size(s), V(v), Flags((f & 7) | ((Log2_32(a) + 1) << 3)) { assert(isPowerOf2_32(a) && "Alignment is not a power of 2!"); + assert((isLoad() || isStore()) && "Not a load/store!"); } //===----------------------------------------------------------------------===//