summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-09 19:48:49 +0000
committerChris Lattner <sabre@nondot.org>2002-04-09 19:48:49 +0000
commit2e9fa6d10146e29690da9c1954f7d699ca719147 (patch)
tree17a8a90eff67468e69fc7f7f4411e94d0f07626b /llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp
parent98d0ac0f8ef7c0a2bed59b1238f760ed17d81fc1 (diff)
downloadbcm5719-llvm-2e9fa6d10146e29690da9c1954f7d699ca719147.tar.gz
bcm5719-llvm-2e9fa6d10146e29690da9c1954f7d699ca719147.zip
Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument. llvm-svn: 2216
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp')
-rw-r--r--llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp b/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp
index 965185a3447..eda16bc6949 100644
--- a/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp
+++ b/llvm/lib/Analysis/DataStructure/FunctionRepBuilder.cpp
@@ -143,26 +143,28 @@ void FunctionRepBuilder::initializeWorkList(Function *Func) {
// the worklists...
//
for (Function::ArgumentListType::iterator I = Func->getArgumentList().begin(),
- E = Func->getArgumentList().end(); I != E; ++I)
+ E = Func->getArgumentList().end(); I != E; ++I) {
+ Value *Arg = (Value*)(*I);
// Only process arguments that are of pointer type...
- if (PointerType *PT = dyn_cast<PointerType>((*I)->getType())) {
- ArgDSNode *Arg = new ArgDSNode(*I);
- ArgNodes.push_back(Arg);
+ if (PointerType *PT = dyn_cast<PointerType>(Arg->getType())) {
+ ArgDSNode *ArgNode = new ArgDSNode(*I);
+ ArgNodes.push_back(ArgNode);
// Add a critical shadow value for it to represent what it is pointing
// to and add this to the value map...
ShadowDSNode *Shad = new ShadowDSNode(PT->getElementType(),
Func->getParent(), true);
ShadowNodes.push_back(Shad);
- ValueMap[*I].add(PointerVal(Shad), *I);
+ ValueMap[Arg].add(PointerVal(Shad), Arg);
// The value of the argument is the shadow value...
- Arg->getLink(0).add(Shad);
+ ArgNode->getLink(0).add(Shad);
// Make sure that all users of the argument are processed...
- addAllUsesToWorkList(*I);
+ addAllUsesToWorkList(Arg);
}
-
+ }
+
// Iterate over the instructions in the method. Create nodes for malloc and
// call instructions. Add all uses of these to the worklist of instructions
// to process.
OpenPOWER on IntegriCloud