Remove getStrValue method from Constant implementations. The AssemblyWriter

now knows how to write out a constant, not the constants themselves.  This is
fixed due to the move of the AsmWriter to the VMcore library.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2297 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-04-18 18:51:39 +00:00
parent 4b1de8eb99
commit 10586abe9a

View File

@ -38,8 +38,6 @@ public:
// Specialize setName to handle symbol table majik...
virtual void setName(const std::string &name, SymbolTable *ST = 0);
virtual std::string getStrValue() const = 0;
// Static constructor to get a '0' constant of arbitrary type...
static Constant *getNullConstant(const Type *Ty);
@ -80,7 +78,6 @@ public:
// inverted - Return the opposite value of the current value.
inline ConstantBool *inverted() const { return (this==True) ? False : True; }
virtual std::string getStrValue() const;
inline bool getValue() const { return Val; }
// isNullValue - Return true if this is the value that would be returned by
@ -151,8 +148,6 @@ protected:
public:
static ConstantSInt *get(const Type *Ty, int64_t V);
virtual std::string getStrValue() const;
static bool isValueValidForType(const Type *Ty, int64_t V);
inline int64_t getValue() const { return Val.Signed; }
@ -175,8 +170,6 @@ protected:
public:
static ConstantUInt *get(const Type *Ty, uint64_t V);
virtual std::string getStrValue() const;
static bool isValueValidForType(const Type *Ty, uint64_t V);
inline uint64_t getValue() const { return Val.Unsigned; }
@ -201,8 +194,6 @@ protected:
public:
static ConstantFP *get(const Type *Ty, double V);
virtual std::string getStrValue() const;
static bool isValueValidForType(const Type *Ty, double V);
inline double getValue() const { return Val; }
@ -233,7 +224,6 @@ public:
static ConstantArray *get(const ArrayType *T, const std::vector<Constant*> &);
static ConstantArray *get(const std::string &Initializer);
virtual std::string getStrValue() const;
inline const ArrayType *getType() const {
return (ArrayType*)Value::getType();
}
@ -267,7 +257,6 @@ public:
static ConstantStruct *get(const StructType *T,
const std::vector<Constant*> &V);
virtual std::string getStrValue() const;
inline const StructType *getType() const {
return (StructType*)Value::getType();
}
@ -299,7 +288,6 @@ protected:
inline ConstantPointer(const PointerType *T) : Constant((const Type*)T){}
~ConstantPointer() {}
public:
virtual std::string getStrValue() const = 0;
inline const PointerType *getType() const {
return (PointerType*)Value::getType();
}
@ -324,7 +312,6 @@ protected:
inline ConstantPointerNull(const PointerType *T) : ConstantPointer(T) {}
inline ~ConstantPointerNull() {}
public:
virtual std::string getStrValue() const;
static ConstantPointerNull *get(const PointerType *T);
@ -361,8 +348,6 @@ protected:
public:
static ConstantPointerRef *get(GlobalValue *GV);
virtual std::string getStrValue() const;
const GlobalValue *getValue() const {
return cast<GlobalValue>(Operands[0].get());
}