diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-07 07:06:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-07 07:06:20 +0000 |
commit | 460ea29b456185e169a5ef036d22e25dd0afa58e (patch) | |
tree | 83559e71f0615f7f155984be1df00f95287e5d38 /lib/Analysis/DataStructure/DataStructure.cpp | |
parent | 076c1f923b515cbae6c4dfc25a84db4a0ce18272 (diff) |
Instead of using a bool that constant has to be explained, use a self
explanitory enum instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 41cd7185ec..31ff0a91b2 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -526,7 +526,7 @@ void DSNode::remapLinks(std::map<const DSNode*, DSNode*> &OldNodeMap) { DSNodeHandle DSGraph::cloneInto(const DSGraph &G, std::map<Value*, DSNodeHandle> &OldValMap, std::map<const DSNode*, DSNode*> &OldNodeMap, - bool StripAllocas) { + AllocaBit StripAllocas) { assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!"); unsigned FN = Nodes.size(); // First new node... @@ -544,11 +544,10 @@ DSNodeHandle DSGraph::cloneInto(const DSGraph &G, for (unsigned i = FN, e = Nodes.size(); i != e; ++i) Nodes[i]->remapLinks(OldNodeMap); - // Remove local markers as specified - unsigned char StripBits = StripAllocas ? DSNode::AllocaNode : 0; - if (StripBits) + // Remove alloca markers as specified + if (StripAllocas == StripAllocaBit) for (unsigned i = FN, e = Nodes.size(); i != e; ++i) - Nodes[i]->NodeType &= ~StripBits; + Nodes[i]->NodeType &= ~DSNode::AllocaNode; // Copy the value map... and merge all of the global nodes... for (std::map<Value*, DSNodeHandle>::const_iterator I = G.ScalarMap.begin(), @@ -580,7 +579,7 @@ DSNodeHandle DSGraph::cloneInto(const DSGraph &G, /// graph. /// void DSGraph::mergeInGraph(DSCallSite &CS, const DSGraph &Graph, - bool StripAllocas) { + AllocaBit StripAllocas) { std::map<Value*, DSNodeHandle> OldValMap; DSNodeHandle RetVal; std::map<Value*, DSNodeHandle> *ScalarMap = &OldValMap; |