diff --git a/include/llvm/Analysis/DataStructure.h b/include/llvm/Analysis/DataStructure.h index 335477fb6ce..bf787ea5ab6 100644 --- a/include/llvm/Analysis/DataStructure.h +++ b/include/llvm/Analysis/DataStructure.h @@ -13,7 +13,7 @@ class Type; class CallInst; class AllocationInst; -class FunctionArgument; +class Argument; class DSNode; class FunctionRepBuilder; class GlobalValue; @@ -312,9 +312,9 @@ private: // ArgDSNode - Represent an incoming argument to the current function... // class ArgDSNode : public DSNode { - FunctionArgument *FuncArg; + Argument *FuncArg; public: - ArgDSNode(FunctionArgument *MA); + ArgDSNode(Argument *FA); virtual std::string getCaption() const; // isEquivalentTo - Return true if the nodes should be merged... diff --git a/include/llvm/Analysis/DataStructure/DataStructure.h b/include/llvm/Analysis/DataStructure/DataStructure.h index 335477fb6ce..bf787ea5ab6 100644 --- a/include/llvm/Analysis/DataStructure/DataStructure.h +++ b/include/llvm/Analysis/DataStructure/DataStructure.h @@ -13,7 +13,7 @@ class Type; class CallInst; class AllocationInst; -class FunctionArgument; +class Argument; class DSNode; class FunctionRepBuilder; class GlobalValue; @@ -312,9 +312,9 @@ private: // ArgDSNode - Represent an incoming argument to the current function... // class ArgDSNode : public DSNode { - FunctionArgument *FuncArg; + Argument *FuncArg; public: - ArgDSNode(FunctionArgument *MA); + ArgDSNode(Argument *FA); virtual std::string getCaption() const; // isEquivalentTo - Return true if the nodes should be merged... diff --git a/include/llvm/Analysis/InstForest.h b/include/llvm/Analysis/InstForest.h index 79b7bca8ef3..68f71420a85 100644 --- a/include/llvm/Analysis/InstForest.h +++ b/include/llvm/Analysis/InstForest.h @@ -240,7 +240,7 @@ InstTreeNode::InstTreeNode(InstForest &IF, Value *V, if (!isa(V)) { assert((isa(V) || isa(V) || - isa(V) || isa(V)) && + isa(V) || isa(V)) && "Unrecognized value type for InstForest Partition!"); if (isa(V)) getTreeData().first.second = ConstNode; diff --git a/include/llvm/Assembly/CachedWriter.h b/include/llvm/Assembly/CachedWriter.h index 2d4741b7f0d..f78df1a5912 100644 --- a/include/llvm/Assembly/CachedWriter.h +++ b/include/llvm/Assembly/CachedWriter.h @@ -15,7 +15,7 @@ class GlobalVariable; class Function; -class FunctionArgument; +class Argument; class BasicBlock; class Instruction; class Constant; @@ -55,7 +55,7 @@ public: inline CachedWriter &operator<<(const Function *X) { return *this << (const Value*)X; } - inline CachedWriter &operator<<(const FunctionArgument *X) { + inline CachedWriter &operator<<(const Argument *X) { return *this << (const Value*)X; } inline CachedWriter &operator<<(const BasicBlock *X) { diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 322cb8af7b5..91df9a70cfa 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -19,8 +19,8 @@ class FunctionType; class Function : public GlobalValue, public SymTabValue { public: - typedef ValueHolder ArgumentListType; - typedef ValueHolder BasicBlocksType; + typedef ValueHolder ArgumentListType; + typedef ValueHolder BasicBlocksType; // BasicBlock iterators... typedef BasicBlocksType::iterator iterator; diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 7ffcf1b7507..b30b4cc125f 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -19,7 +19,7 @@ class User; class Type; class Constant; -class FunctionArgument; +class Argument; class Instruction; class BasicBlock; class GlobalValue; @@ -40,7 +40,7 @@ public: enum ValueTy { TypeVal, // This is an instance of Type ConstantVal, // This is an instance of Constant - FunctionArgumentVal, // This is an instance of FunctionArgument + ArgumentVal, // This is an instance of Argument InstructionVal, // This is an instance of Instruction BasicBlockVal, // This is an instance of BasicBlock FunctionVal, // This is an instance of Function @@ -202,11 +202,11 @@ template <> inline bool isa(const Value *Val) { template <> inline bool isa(Value *Val) { return Val->getValueType() == Value::ConstantVal; } -template <> inline bool isa(const Value *Val) { - return Val->getValueType() == Value::FunctionArgumentVal; +template <> inline bool isa(const Value *Val) { + return Val->getValueType() == Value::ArgumentVal; } -template <> inline bool isa(Value *Val) { - return Val->getValueType() == Value::FunctionArgumentVal; +template <> inline bool isa(Value *Val) { + return Val->getValueType() == Value::ArgumentVal; } template <> inline bool isa(const Value *Val) { return Val->getValueType() == Value::InstructionVal; diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 484dbe2ee6c..91f3e891447 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -1029,7 +1029,7 @@ MethodInfo::MethodInfo(Function *M) : Annotation(MethodInfoAID) { const Function::ArgumentListType &ArgList = M->getArgumentList(); for (Function::ArgumentListType::const_iterator AI = ArgList.begin(), AE = ArgList.end(); AI != AE; ++AI) - (*AI)->addAnnotation(new SlotNumber(getValueSlot(*AI))); + ((Value*)(*AI))->addAnnotation(new SlotNumber(getValueSlot((Value*)*AI))); // Iterate over all of the instructions... unsigned InstNum = 0; @@ -1114,9 +1114,9 @@ void Interpreter::callMethod(Function *M, const vector &ArgVals) { assert(ArgVals.size() == M->getArgumentList().size() && "Invalid number of values passed to function invocation!"); unsigned i = 0; - for (Function::ArgumentListType::iterator MI = M->getArgumentList().begin(), - ME = M->getArgumentList().end(); MI != ME; ++MI, ++i) { - SetValue(*MI, ArgVals[i], StackFrame); + for (Function::ArgumentListType::iterator AI = M->getArgumentList().begin(), + AE = M->getArgumentList().end(); AI != AE; ++AI, ++i) { + SetValue((Value*)*AI, ArgVals[i], StackFrame); } } @@ -1360,7 +1360,8 @@ void Interpreter::printStackFrame(int FrameNo = -1) { if (i != 0) cout << ", "; CW << (Value*)Args[i] << "="; - printValue(Args[i]->getType(), getOperandValue(Args[i], ECStack[FrameNo])); + printValue(((Value*)Args[i])->getType(), + getOperandValue((Value*)Args[i], ECStack[FrameNo])); } cout << ")\n";