From 5e865cdbe26bb91abc903300bfc231cd1e14a91c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 7 Nov 2002 07:06:20 +0000 Subject: Instead of using a bool that constant has to be explained, use a self explanitory enum instead. llvm-svn: 4600 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp') diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index 41cd7185ec9..31ff0a91b24 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -526,7 +526,7 @@ void DSNode::remapLinks(std::map &OldNodeMap) { DSNodeHandle DSGraph::cloneInto(const DSGraph &G, std::map &OldValMap, std::map &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::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 OldValMap; DSNodeHandle RetVal; std::map *ScalarMap = &OldValMap; -- cgit v1.2.3