Move FunctionArgument out of iOther.h into Argument.h and rename class to
be 'Argument' instead of FunctionArgument. llvm-svn: 2217
This commit is contained in:
parent
2e9fa6d101
commit
87b84e474f
|
@ -13,7 +13,7 @@
|
||||||
class Type;
|
class Type;
|
||||||
class CallInst;
|
class CallInst;
|
||||||
class AllocationInst;
|
class AllocationInst;
|
||||||
class FunctionArgument;
|
class Argument;
|
||||||
class DSNode;
|
class DSNode;
|
||||||
class FunctionRepBuilder;
|
class FunctionRepBuilder;
|
||||||
class GlobalValue;
|
class GlobalValue;
|
||||||
|
@ -312,9 +312,9 @@ private:
|
||||||
// ArgDSNode - Represent an incoming argument to the current function...
|
// ArgDSNode - Represent an incoming argument to the current function...
|
||||||
//
|
//
|
||||||
class ArgDSNode : public DSNode {
|
class ArgDSNode : public DSNode {
|
||||||
FunctionArgument *FuncArg;
|
Argument *FuncArg;
|
||||||
public:
|
public:
|
||||||
ArgDSNode(FunctionArgument *MA);
|
ArgDSNode(Argument *FA);
|
||||||
virtual std::string getCaption() const;
|
virtual std::string getCaption() const;
|
||||||
|
|
||||||
// isEquivalentTo - Return true if the nodes should be merged...
|
// isEquivalentTo - Return true if the nodes should be merged...
|
||||||
|
|
|
@ -240,7 +240,7 @@ InstTreeNode<Payload>::InstTreeNode(InstForest<Payload> &IF, Value *V,
|
||||||
|
|
||||||
if (!isa<Instruction>(V)) {
|
if (!isa<Instruction>(V)) {
|
||||||
assert((isa<Constant>(V) || isa<BasicBlock>(V) ||
|
assert((isa<Constant>(V) || isa<BasicBlock>(V) ||
|
||||||
isa<FunctionArgument>(V) || isa<GlobalValue>(V)) &&
|
isa<Argument>(V) || isa<GlobalValue>(V)) &&
|
||||||
"Unrecognized value type for InstForest Partition!");
|
"Unrecognized value type for InstForest Partition!");
|
||||||
if (isa<Constant>(V))
|
if (isa<Constant>(V))
|
||||||
getTreeData().first.second = ConstNode;
|
getTreeData().first.second = ConstNode;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
class GlobalVariable;
|
class GlobalVariable;
|
||||||
class Function;
|
class Function;
|
||||||
class FunctionArgument;
|
class Argument;
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
class Instruction;
|
class Instruction;
|
||||||
class Constant;
|
class Constant;
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
inline CachedWriter &operator<<(const Function *X) {
|
inline CachedWriter &operator<<(const Function *X) {
|
||||||
return *this << (const Value*)X;
|
return *this << (const Value*)X;
|
||||||
}
|
}
|
||||||
inline CachedWriter &operator<<(const FunctionArgument *X) {
|
inline CachedWriter &operator<<(const Argument *X) {
|
||||||
return *this << (const Value*)X;
|
return *this << (const Value*)X;
|
||||||
}
|
}
|
||||||
inline CachedWriter &operator<<(const BasicBlock *X) {
|
inline CachedWriter &operator<<(const BasicBlock *X) {
|
||||||
|
|
|
@ -19,8 +19,8 @@ class FunctionType;
|
||||||
|
|
||||||
class Function : public GlobalValue, public SymTabValue {
|
class Function : public GlobalValue, public SymTabValue {
|
||||||
public:
|
public:
|
||||||
typedef ValueHolder<FunctionArgument, Function, Function> ArgumentListType;
|
typedef ValueHolder<Argument , Function, Function> ArgumentListType;
|
||||||
typedef ValueHolder<BasicBlock , Function, Function> BasicBlocksType;
|
typedef ValueHolder<BasicBlock, Function, Function> BasicBlocksType;
|
||||||
|
|
||||||
// BasicBlock iterators...
|
// BasicBlock iterators...
|
||||||
typedef BasicBlocksType::iterator iterator;
|
typedef BasicBlocksType::iterator iterator;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
class User;
|
class User;
|
||||||
class Type;
|
class Type;
|
||||||
class Constant;
|
class Constant;
|
||||||
class FunctionArgument;
|
class Argument;
|
||||||
class Instruction;
|
class Instruction;
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
class GlobalValue;
|
class GlobalValue;
|
||||||
|
@ -40,7 +40,7 @@ public:
|
||||||
enum ValueTy {
|
enum ValueTy {
|
||||||
TypeVal, // This is an instance of Type
|
TypeVal, // This is an instance of Type
|
||||||
ConstantVal, // This is an instance of Constant
|
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
|
InstructionVal, // This is an instance of Instruction
|
||||||
BasicBlockVal, // This is an instance of BasicBlock
|
BasicBlockVal, // This is an instance of BasicBlock
|
||||||
FunctionVal, // This is an instance of Function
|
FunctionVal, // This is an instance of Function
|
||||||
|
@ -202,11 +202,11 @@ template <> inline bool isa<Constant, const Value*>(const Value *Val) {
|
||||||
template <> inline bool isa<Constant, Value*>(Value *Val) {
|
template <> inline bool isa<Constant, Value*>(Value *Val) {
|
||||||
return Val->getValueType() == Value::ConstantVal;
|
return Val->getValueType() == Value::ConstantVal;
|
||||||
}
|
}
|
||||||
template <> inline bool isa<FunctionArgument, const Value*>(const Value *Val) {
|
template <> inline bool isa<Argument, const Value*>(const Value *Val) {
|
||||||
return Val->getValueType() == Value::FunctionArgumentVal;
|
return Val->getValueType() == Value::ArgumentVal;
|
||||||
}
|
}
|
||||||
template <> inline bool isa<FunctionArgument, Value*>(Value *Val) {
|
template <> inline bool isa<Argument, Value*>(Value *Val) {
|
||||||
return Val->getValueType() == Value::FunctionArgumentVal;
|
return Val->getValueType() == Value::ArgumentVal;
|
||||||
}
|
}
|
||||||
template <> inline bool isa<Instruction, const Value*>(const Value *Val) {
|
template <> inline bool isa<Instruction, const Value*>(const Value *Val) {
|
||||||
return Val->getValueType() == Value::InstructionVal;
|
return Val->getValueType() == Value::InstructionVal;
|
||||||
|
|
|
@ -1029,7 +1029,7 @@ MethodInfo::MethodInfo(Function *M) : Annotation(MethodInfoAID) {
|
||||||
const Function::ArgumentListType &ArgList = M->getArgumentList();
|
const Function::ArgumentListType &ArgList = M->getArgumentList();
|
||||||
for (Function::ArgumentListType::const_iterator AI = ArgList.begin(),
|
for (Function::ArgumentListType::const_iterator AI = ArgList.begin(),
|
||||||
AE = ArgList.end(); AI != AE; ++AI)
|
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...
|
// Iterate over all of the instructions...
|
||||||
unsigned InstNum = 0;
|
unsigned InstNum = 0;
|
||||||
|
@ -1114,9 +1114,9 @@ void Interpreter::callMethod(Function *M, const vector<GenericValue> &ArgVals) {
|
||||||
assert(ArgVals.size() == M->getArgumentList().size() &&
|
assert(ArgVals.size() == M->getArgumentList().size() &&
|
||||||
"Invalid number of values passed to function invocation!");
|
"Invalid number of values passed to function invocation!");
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
for (Function::ArgumentListType::iterator MI = M->getArgumentList().begin(),
|
for (Function::ArgumentListType::iterator AI = M->getArgumentList().begin(),
|
||||||
ME = M->getArgumentList().end(); MI != ME; ++MI, ++i) {
|
AE = M->getArgumentList().end(); AI != AE; ++AI, ++i) {
|
||||||
SetValue(*MI, ArgVals[i], StackFrame);
|
SetValue((Value*)*AI, ArgVals[i], StackFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1360,7 +1360,8 @@ void Interpreter::printStackFrame(int FrameNo = -1) {
|
||||||
if (i != 0) cout << ", ";
|
if (i != 0) cout << ", ";
|
||||||
CW << (Value*)Args[i] << "=";
|
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";
|
cout << ")\n";
|
||||||
|
|
Loading…
Reference in New Issue