aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DataStructure.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-06 18:01:39 +0000
committerChris Lattner <sabre@nondot.org>2002-11-06 18:01:39 +0000
commit2c0bd014c58b0bd6d721fb8c06d70e05330aeb6e (patch)
tree89644152579b4bb5511ed15ad498210dbd1732d5 /lib/Analysis/DataStructure/DataStructure.cpp
parent75310d59c979f2c281427fcc59709bb375a7379f (diff)
Make PointerSize & Shift be enums
Fix problem with recursive merging git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index 77407ad47a..740ece86f5 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/lib/Analysis/DataStructure/DataStructure.cpp
@@ -20,11 +20,6 @@ namespace {
Statistic<> NumFolds("dsnode", "Number of nodes completely folded");
};
-namespace DS {
- const unsigned PointerShift = 3; // 64bit ptrs = 3, 32 bit ptrs = 2
- const unsigned PointerSize = 1 << PointerShift;
-};
-
namespace DataStructureAnalysis { // TODO: FIXME
// isPointerType - Return true if this first class type is big enough to hold
// a pointer.
@@ -392,7 +387,7 @@ void DSNode::mergeWith(const DSNodeHandle &NH, unsigned Offset) {
}
N = NH.getNode();
- if (this == N) return;
+ if (this == N || N == 0) return;
// If both nodes are not at offset 0, make sure that we are merging the node
// at an later offset into the node with the zero offset.