[llvm-commits] [llvm] r144303 - /llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Owen Anderson
resistor at mac.com
Thu Nov 10 11:25:09 PST 2011
Author: resistor
Date: Thu Nov 10 13:25:09 2011
New Revision: 144303
URL: http://llvm.org/viewvc/llvm-project?rev=144303&view=rev
Log:
Add additional checking to ensure that MachineMemOperands are never set to null, which can happen in weird circumstances where target intrinsic hooks are implemented incorrectly.
Modified:
llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=144303&r1=144302&r2=144303&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Thu Nov 10 13:25:09 2011
@@ -1685,6 +1685,8 @@
/// setMemRefs - Assign this MachineSDNodes's memory reference descriptor
/// list. This does not transfer ownership.
void setMemRefs(mmo_iterator NewMemRefs, mmo_iterator NewMemRefsEnd) {
+ for (mmo_iterator MMI = NewMemRefs, MME = NewMemRefsEnd; MMI != MME; ++MMI)
+ assert(*MMI && "Null mem ref detected!");
MemRefs = NewMemRefs;
MemRefsEnd = NewMemRefsEnd;
}
More information about the llvm-commits
mailing list