aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-06-23 22:25:41 +0000
committerDevang Patel <dpatel@apple.com>2009-06-23 22:25:41 +0000
commit7e133e55c7aa7df414162750c00914cea13ea1fa (patch)
tree4b5429793e4124c1fcbd9313b7f24c8c9828d7e2 /lib/Analysis
parentff8704340c2e9a41107872131f323a6029a5707e (diff)
downloadexternal_llvm-7e133e55c7aa7df414162750c00914cea13ea1fa.zip
external_llvm-7e133e55c7aa7df414162750c00914cea13ea1fa.tar.gz
external_llvm-7e133e55c7aa7df414162750c00914cea13ea1fa.tar.bz2
It is not a good idea to have data member's name match argument's name. In fact, it is a simple receipe to waste an hour or so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DebugInfo.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index adda5ee..11a56bd 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -73,22 +73,22 @@ bool DIDescriptor::ValidDebugInfo(Value *V, CodeGenOpt::Level OptLevel) {
return true;
}
-DIDescriptor::DIDescriptor(GlobalVariable *gv, unsigned RequiredTag) {
- GV = gv;
+DIDescriptor::DIDescriptor(GlobalVariable *GV, unsigned RequiredTag) {
+ DbgGV = GV;
// If this is non-null, check to see if the Tag matches. If not, set to null.
if (GV && getTag() != RequiredTag)
- GV = 0;
+ DbgGV = 0;
}
const std::string &
DIDescriptor::getStringField(unsigned Elt, std::string &Result) const {
- if (GV == 0) {
+ if (DbgGV == 0) {
Result.clear();
return Result;
}
- Constant *C = GV->getInitializer();
+ Constant *C = DbgGV->getInitializer();
if (C == 0 || Elt >= C->getNumOperands()) {
Result.clear();
return Result;
@@ -102,9 +102,9 @@ DIDescriptor::getStringField(unsigned Elt, std::string &Result) const {
}
uint64_t DIDescriptor::getUInt64Field(unsigned Elt) const {
- if (GV == 0) return 0;
+ if (DbgGV == 0) return 0;
- Constant *C = GV->getInitializer();
+ Constant *C = DbgGV->getInitializer();
if (C == 0 || Elt >= C->getNumOperands())
return 0;
@@ -114,9 +114,9 @@ uint64_t DIDescriptor::getUInt64Field(unsigned Elt) const {
}
DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
- if (GV == 0) return DIDescriptor();
+ if (DbgGV == 0) return DIDescriptor();
- Constant *C = GV->getInitializer();
+ Constant *C = DbgGV->getInitializer();
if (C == 0 || Elt >= C->getNumOperands())
return DIDescriptor();
@@ -125,9 +125,9 @@ DIDescriptor DIDescriptor::getDescriptorField(unsigned Elt) const {
}
GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
- if (GV == 0) return 0;
+ if (DbgGV == 0) return 0;
- Constant *C = GV->getInitializer();
+ Constant *C = DbgGV->getInitializer();
if (C == 0 || Elt >= C->getNumOperands())
return 0;
@@ -140,12 +140,12 @@ GlobalVariable *DIDescriptor::getGlobalVariableField(unsigned Elt) const {
//===----------------------------------------------------------------------===//
// Needed by DIVariable::getType().
-DIType::DIType(GlobalVariable *gv) : DIDescriptor(gv) {
- if (!gv) return;
+DIType::DIType(GlobalVariable *GV) : DIDescriptor(GV) {
+ if (!GV) return;
unsigned tag = getTag();
if (tag != dwarf::DW_TAG_base_type && !DIDerivedType::isDerivedType(tag) &&
!DICompositeType::isCompositeType(tag))
- GV = 0;
+ DbgGV = 0;
}
/// isDerivedType - Return true if the specified tag is legal for
@@ -198,8 +198,8 @@ bool DIVariable::isVariable(unsigned Tag) {
}
unsigned DIArray::getNumElements() const {
- assert (GV && "Invalid DIArray");
- Constant *C = GV->getInitializer();
+ assert (DbgGV && "Invalid DIArray");
+ Constant *C = DbgGV->getInitializer();
assert (C && "Invalid DIArray initializer");
return C->getNumOperands();
}
@@ -959,7 +959,7 @@ namespace llvm {
/// dump - Print descriptor.
void DIDescriptor::dump() const {
cerr << "[" << dwarf::TagString(getTag()) << "] ";
- cerr << std::hex << "[GV:" << GV << "]" << std::dec;
+ cerr << std::hex << "[GV:" << DbgGV << "]" << std::dec;
}
/// dump - Print compile unit.
@@ -1000,11 +1000,11 @@ void DIType::dump() const {
cerr << " [fwd] ";
if (isBasicType(Tag))
- DIBasicType(GV).dump();
+ DIBasicType(DbgGV).dump();
else if (isDerivedType(Tag))
- DIDerivedType(GV).dump();
+ DIDerivedType(DbgGV).dump();
else if (isCompositeType(Tag))
- DICompositeType(GV).dump();
+ DICompositeType(DbgGV).dump();
else {
cerr << "Invalid DIType\n";
return;
@@ -1051,7 +1051,7 @@ void DIGlobal::dump() const {
cerr << " [def] ";
if (isGlobalVariable(Tag))
- DIGlobalVariable(GV).dump();
+ DIGlobalVariable(DbgGV).dump();
cerr << "\n";
}