[llvm-commits] CVS: llvm/include/llvm/Analysis/DSNode.h
Vikram Adve
vadve at cs.uiuc.edu
Sun May 23 02:36:02 PDT 2004
Changes in directory llvm/include/llvm/Analysis:
DSNode.h updated: 1.41 -> 1.42
---
Log message:
Fix size/offset assertion to allow negative offsets and folded nodes.
---
Diffs of the changes: (+8 -1)
Index: llvm/include/llvm/Analysis/DSNode.h
diff -u llvm/include/llvm/Analysis/DSNode.h:1.41 llvm/include/llvm/Analysis/DSNode.h:1.42
--- llvm/include/llvm/Analysis/DSNode.h:1.41 Thu Mar 11 17:08:20 2004
+++ llvm/include/llvm/Analysis/DSNode.h Sun May 23 02:34:53 2004
@@ -386,7 +386,14 @@
// Define inline DSNodeHandle functions that depend on the definition of DSNode
//
inline DSNode *DSNodeHandle::getNode() const {
- assert((!N || Offset < N->Size || (N->Size == 0 && Offset == 0) ||
+ // Disabling this assertion because it is failing on a "magic" struct
+ // in named (from bind). The fourth field is an array of length 0,
+ // presumably used to create struct instances of different sizes.
+ assert((!N ||
+ N->isNodeCompletelyFolded() ||
+ (N->Size == 0 && Offset == 0) ||
+ (int(Offset) >= 0 && Offset < N->Size) ||
+ (int(Offset) < 0 && -int(Offset) < int(N->Size)) ||
N->isForwarding()) && "Node handle offset out of range!");
if (N == 0 || !N->isForwarding())
return N;
More information about the llvm-commits
mailing list