aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure/NodeImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/NodeImpl.cpp')
-rw-r--r--lib/Analysis/DataStructure/NodeImpl.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Analysis/DataStructure/NodeImpl.cpp b/lib/Analysis/DataStructure/NodeImpl.cpp
index 76b82ba..bd279b6 100644
--- a/lib/Analysis/DataStructure/NodeImpl.cpp
+++ b/lib/Analysis/DataStructure/NodeImpl.cpp
@@ -8,7 +8,6 @@
#include "llvm/Assembly/Writer.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
-#include "llvm/BasicBlock.h"
#include "llvm/iMemory.h"
#include "llvm/iOther.h"
#include "Support/STLExtras.h"
@@ -18,6 +17,7 @@
bool AllocDSNode::isEquivalentTo(DSNode *Node) const {
if (AllocDSNode *N = dyn_cast<AllocDSNode>(Node))
return getType() == Node->getType();
+ //&& isAllocaNode() == N->isAllocaNode();
return false;
}
@@ -423,12 +423,11 @@ PointerValSet FunctionDSGraph::cloneFunctionIntoSelf(const FunctionDSGraph &DSG,
// Convert over the arguments...
Function *OF = DSG.getFunction();
- for (Function::ArgumentListType::iterator I = OF->getArgumentList().begin(),
- E = OF->getArgumentList().end(); I != E; ++I)
- if (isa<PointerType>(((Value*)*I)->getType())) {
+ for (Function::aiterator I = OF->abegin(), E = OF->aend(); I != E; ++I)
+ if (isa<PointerType>(I->getType())) {
PointerValSet ArgPVS;
- assert(DSG.getValueMap().find((Value*)*I) != DSG.getValueMap().end());
- MapPVS(ArgPVS, DSG.getValueMap().find((Value*)*I)->second, NodeMap);
+ assert(DSG.getValueMap().find(I) != DSG.getValueMap().end());
+ MapPVS(ArgPVS, DSG.getValueMap().find(I)->second, NodeMap);
assert(!ArgPVS.empty() && "Argument has no links!");
Args.push_back(ArgPVS);
}