From ce4a2e1132b1d8456856ca82259f3fa413fecb8d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 6 Nov 2002 18:02:26 +0000 Subject: [PATCH] Make PointerShift/Size be enums so they are constants instead of globals git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4571 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DSSupport.h | 6 ++++-- include/llvm/Analysis/DataStructure/DSSupport.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/llvm/Analysis/DSSupport.h b/include/llvm/Analysis/DSSupport.h index acaac37d1c2..dfd4bd79764 100644 --- a/include/llvm/Analysis/DSSupport.h +++ b/include/llvm/Analysis/DSSupport.h @@ -22,8 +22,10 @@ class DSNode; // Each node in the graph class DSGraph; // A graph for a function class DSNodeIterator; // Data structure graph traversal iterator -namespace DS { - extern const unsigned PointerShift; // 64bit ptrs = 3, 32 bit ptrs = 2 +namespace DS { // FIXME: After the paper, this should get cleaned up + enum { PointerShift = 3, // 64bit ptrs = 3, 32 bit ptrs = 2 + PointerSize = 1 << PointerShift + }; }; //===----------------------------------------------------------------------===// diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index acaac37d1c2..dfd4bd79764 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -22,8 +22,10 @@ class DSNode; // Each node in the graph class DSGraph; // A graph for a function class DSNodeIterator; // Data structure graph traversal iterator -namespace DS { - extern const unsigned PointerShift; // 64bit ptrs = 3, 32 bit ptrs = 2 +namespace DS { // FIXME: After the paper, this should get cleaned up + enum { PointerShift = 3, // 64bit ptrs = 3, 32 bit ptrs = 2 + PointerSize = 1 << PointerShift + }; }; //===----------------------------------------------------------------------===// -- 2.34.1