diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-26 17:48:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-26 17:48:08 +0000 |
commit | 19b0411c95335018f0d1c6b6f029983fc2d79761 (patch) | |
tree | ae808a443364ea3d98ae067a7bfb6c84d1a0330d /include/llvm/iOther.h | |
parent | 7797946c5ee036a7edf932c156e496742a289221 (diff) | |
download | external_llvm-19b0411c95335018f0d1c6b6f029983fc2d79761.zip external_llvm-19b0411c95335018f0d1c6b6f029983fc2d79761.tar.gz external_llvm-19b0411c95335018f0d1c6b6f029983fc2d79761.tar.bz2 |
Transform uses of Method into uses of Function.
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/iOther.h')
-rw-r--r-- | include/llvm/iOther.h | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/include/llvm/iOther.h b/include/llvm/iOther.h index 85698da..5100ac3 100644 --- a/include/llvm/iOther.h +++ b/include/llvm/iOther.h @@ -9,7 +9,7 @@ #define LLVM_IOTHER_H #include "llvm/InstrTypes.h" -#include "llvm/Method.h" +#include "llvm/Function.h" //===----------------------------------------------------------------------===// // CastInst Class @@ -45,31 +45,31 @@ public: //===----------------------------------------------------------------------===// -// MethodArgument Class +// FunctionArgument Class //===----------------------------------------------------------------------===// -class MethodArgument : public Value { // Defined in the InstrType.cpp file - Method *Parent; +class FunctionArgument : public Value { // Defined in the InstrType.cpp file + Function *Parent; - friend class ValueHolder<MethodArgument,Method,Method>; - inline void setParent(Method *parent) { Parent = parent; } + friend class ValueHolder<FunctionArgument,Function,Function>; + inline void setParent(Function *parent) { Parent = parent; } public: - MethodArgument(const Type *Ty, const std::string &Name = "") - : Value(Ty, Value::MethodArgumentVal, Name) { + FunctionArgument(const Type *Ty, const std::string &Name = "") + : Value(Ty, Value::FunctionArgumentVal, Name) { Parent = 0; } // Specialize setName to handle symbol table majik... virtual void setName(const std::string &name, SymbolTable *ST = 0); - inline const Method *getParent() const { return Parent; } - inline Method *getParent() { return Parent; } + inline const Function *getParent() const { return Parent; } + inline Function *getParent() { return Parent; } // Methods for support type inquiry through isa, cast, and dyn_cast: - static inline bool classof(const MethodArgument *) { return true; } + static inline bool classof(const FunctionArgument *) { return true; } static inline bool classof(const Value *V) { - return V->getValueType() == MethodArgumentVal; + return V->getValueType() == FunctionArgumentVal; } }; @@ -88,13 +88,17 @@ public: virtual Instruction *clone() const { return new CallInst(*this); } bool hasSideEffects() const { return true; } - const Method *getCalledMethod() const { - return dyn_cast<Method>(Operands[0]); + const Function *getCalledFunction() const { + return dyn_cast<Function>(Operands[0]); } - Method *getCalledMethod() { - return dyn_cast<Method>(Operands[0]); + Function *getCalledFunction() { + return dyn_cast<Function>(Operands[0]); } + // FIXME: Remove getCalledMethod's + const Function*getCalledMethod()const{return dyn_cast<Function>(Operands[0]);} + Function *getCalledMethod() { return dyn_cast<Function>(Operands[0]); } + // getCalledValue - Get a pointer to a method that is invoked by this inst. inline const Value *getCalledValue() const { return Operands[0]; } inline Value *getCalledValue() { return Operands[0]; } |