Rename instance variables, parameter argument names to eliminate a bunch of compilation warnings with -Wshadow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2008-07-24 00:08:56 +00:00
parent 7fbad27cfb
commit 1bf9a18834
4 changed files with 245 additions and 240 deletions

View File

@ -316,15 +316,15 @@ class CastInst : public UnaryInstruction {
protected: protected:
/// @brief Constructor with insert-before-instruction semantics for subclasses /// @brief Constructor with insert-before-instruction semantics for subclasses
CastInst(const Type *Ty, unsigned iType, Value *S, CastInst(const Type *Ty, unsigned iType, Value *S,
const std::string &Name = "", Instruction *InsertBefore = 0) const std::string &NameStr = "", Instruction *InsertBefore = 0)
: UnaryInstruction(Ty, iType, S, InsertBefore) { : UnaryInstruction(Ty, iType, S, InsertBefore) {
setName(Name); setName(NameStr);
} }
/// @brief Constructor with insert-at-end-of-block semantics for subclasses /// @brief Constructor with insert-at-end-of-block semantics for subclasses
CastInst(const Type *Ty, unsigned iType, Value *S, CastInst(const Type *Ty, unsigned iType, Value *S,
const std::string &Name, BasicBlock *InsertAtEnd) const std::string &NameStr, BasicBlock *InsertAtEnd)
: UnaryInstruction(Ty, iType, S, InsertAtEnd) { : UnaryInstruction(Ty, iType, S, InsertAtEnd) {
setName(Name); setName(NameStr);
} }
public: public:
/// Provides a way to construct any of the CastInst subclasses using an /// Provides a way to construct any of the CastInst subclasses using an

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@ protected:
/// This field is initialized to zero by the ctor. /// This field is initialized to zero by the ctor.
unsigned short SubclassData; unsigned short SubclassData;
private: private:
PATypeHolder Ty; PATypeHolder VTy;
Use *UseList; Use *UseList;
friend class ValueSymbolTable; // Allow ValueSymbolTable to directly mod Name. friend class ValueSymbolTable; // Allow ValueSymbolTable to directly mod Name.
@ -83,7 +83,7 @@ public:
/// All values are typed, get the type of this value. /// All values are typed, get the type of this value.
/// ///
inline const Type *getType() const { return Ty; } inline const Type *getType() const { return VTy; }
// All values can potentially be named... // All values can potentially be named...
inline bool hasName() const { return Name != 0; } inline bool hasName() const { return Name != 0; }
@ -222,7 +222,7 @@ public:
/// getRawType - This should only be used to implement the vmcore library. /// getRawType - This should only be used to implement the vmcore library.
/// ///
const Type *getRawType() const { return Ty.getRawType(); } const Type *getRawType() const { return VTy.getRawType(); }
/// stripPointerCasts - This method strips off any unneeded pointer /// stripPointerCasts - This method strips off any unneeded pointer
/// casts from the specified value, returning the original uncasted value. /// casts from the specified value, returning the original uncasted value.

View File

@ -33,14 +33,14 @@ static inline const Type *checkType(const Type *Ty) {
} }
Value::Value(const Type *ty, unsigned scid) Value::Value(const Type *ty, unsigned scid)
: SubclassID(scid), SubclassData(0), Ty(checkType(ty)), : SubclassID(scid), SubclassData(0), VTy(checkType(ty)),
UseList(0), Name(0) { UseList(0), Name(0) {
if (isa<CallInst>(this) || isa<InvokeInst>(this)) if (isa<CallInst>(this) || isa<InvokeInst>(this))
assert((Ty->isFirstClassType() || Ty == Type::VoidTy || assert((VTy->isFirstClassType() || VTy == Type::VoidTy ||
isa<OpaqueType>(ty) || Ty->getTypeID() == Type::StructTyID) && isa<OpaqueType>(ty) || VTy->getTypeID() == Type::StructTyID) &&
"invalid CallInst type!"); "invalid CallInst type!");
else if (!isa<Constant>(this) && !isa<BasicBlock>(this)) else if (!isa<Constant>(this) && !isa<BasicBlock>(this))
assert((Ty->isFirstClassType() || Ty == Type::VoidTy || assert((VTy->isFirstClassType() || VTy == Type::VoidTy ||
isa<OpaqueType>(ty)) && isa<OpaqueType>(ty)) &&
"Cannot create non-first-class values except for constants!"); "Cannot create non-first-class values except for constants!");
} }
@ -54,7 +54,7 @@ Value::~Value() {
// a <badref> // a <badref>
// //
if (!use_empty()) { if (!use_empty()) {
DOUT << "While deleting: " << *Ty << " %" << getNameStr() << "\n"; DOUT << "While deleting: " << *VTy << " %" << getNameStr() << "\n";
for (use_iterator I = use_begin(), E = use_end(); I != E; ++I) for (use_iterator I = use_begin(), E = use_end(); I != E; ++I)
DOUT << "Use still stuck around after Def is destroyed:" DOUT << "Use still stuck around after Def is destroyed:"
<< **I << "\n"; << **I << "\n";