Avoid using "Type" as the variable name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-01-23 00:26:28 +00:00
parent 1402f0b2ca
commit 2e369930dc
2 changed files with 16 additions and 15 deletions

View File

@ -587,7 +587,7 @@ namespace llvm {
StringRef DisplayName, StringRef DisplayName,
StringRef LinkageName, StringRef LinkageName,
DICompileUnit CompileUnit, unsigned LineNo, DICompileUnit CompileUnit, unsigned LineNo,
DIType Type, bool isLocalToUnit, DIType Ty, bool isLocalToUnit,
bool isDefinition, bool isDefinition,
unsigned VK = 0, unsigned VK = 0,
unsigned VIndex = 0, unsigned VIndex = 0,
@ -603,21 +603,21 @@ namespace llvm {
StringRef DisplayName, StringRef DisplayName,
StringRef LinkageName, StringRef LinkageName,
DICompileUnit CompileUnit, DICompileUnit CompileUnit,
unsigned LineNo, DIType Type, bool isLocalToUnit, unsigned LineNo, DIType Ty, bool isLocalToUnit,
bool isDefinition, llvm::GlobalVariable *GV); bool isDefinition, llvm::GlobalVariable *GV);
/// CreateVariable - Create a new descriptor for the specified variable. /// CreateVariable - Create a new descriptor for the specified variable.
DIVariable CreateVariable(unsigned Tag, DIDescriptor Context, DIVariable CreateVariable(unsigned Tag, DIDescriptor Context,
StringRef Name, StringRef Name,
DICompileUnit CompileUnit, unsigned LineNo, DICompileUnit CompileUnit, unsigned LineNo,
DIType Type); DIType Ty);
/// CreateComplexVariable - Create a new descriptor for the specified /// CreateComplexVariable - Create a new descriptor for the specified
/// variable which has a complex address expression for its address. /// variable which has a complex address expression for its address.
DIVariable CreateComplexVariable(unsigned Tag, DIDescriptor Context, DIVariable CreateComplexVariable(unsigned Tag, DIDescriptor Context,
const std::string &Name, const std::string &Name,
DICompileUnit CompileUnit, unsigned LineNo, DICompileUnit CompileUnit, unsigned LineNo,
DIType Type, DIType Ty,
SmallVector<Value *, 9> &addr); SmallVector<Value *, 9> &addr);
/// CreateLexicalBlock - This creates a descriptor for a lexical block /// CreateLexicalBlock - This creates a descriptor for a lexical block

View File

@ -854,7 +854,7 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context,
StringRef DisplayName, StringRef DisplayName,
StringRef LinkageName, StringRef LinkageName,
DICompileUnit CompileUnit, DICompileUnit CompileUnit,
unsigned LineNo, DIType Type, unsigned LineNo, DIType Ty,
bool isLocalToUnit, bool isLocalToUnit,
bool isDefinition, bool isDefinition,
unsigned VK, unsigned VIndex, unsigned VK, unsigned VIndex,
@ -869,7 +869,7 @@ DISubprogram DIFactory::CreateSubprogram(DIDescriptor Context,
MDString::get(VMContext, LinkageName), MDString::get(VMContext, LinkageName),
CompileUnit.getNode(), CompileUnit.getNode(),
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
Type.getNode(), Ty.getNode(),
ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit), ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit),
ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition), ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition),
ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK), ConstantInt::get(Type::getInt32Ty(VMContext), (unsigned)VK),
@ -911,7 +911,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, StringRef Name,
StringRef DisplayName, StringRef DisplayName,
StringRef LinkageName, StringRef LinkageName,
DICompileUnit CompileUnit, DICompileUnit CompileUnit,
unsigned LineNo, DIType Type,bool isLocalToUnit, unsigned LineNo, DIType Ty,bool isLocalToUnit,
bool isDefinition, llvm::GlobalVariable *Val) { bool isDefinition, llvm::GlobalVariable *Val) {
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(dwarf::DW_TAG_variable), GetTagConstant(dwarf::DW_TAG_variable),
@ -922,7 +922,7 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, StringRef Name,
MDString::get(VMContext, LinkageName), MDString::get(VMContext, LinkageName),
CompileUnit.getNode(), CompileUnit.getNode(),
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
Type.getNode(), Ty.getNode(),
ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit), ConstantInt::get(Type::getInt1Ty(VMContext), isLocalToUnit),
ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition), ConstantInt::get(Type::getInt1Ty(VMContext), isDefinition),
Val Val
@ -943,14 +943,14 @@ DIFactory::CreateGlobalVariable(DIDescriptor Context, StringRef Name,
DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context, DIVariable DIFactory::CreateVariable(unsigned Tag, DIDescriptor Context,
StringRef Name, StringRef Name,
DICompileUnit CompileUnit, unsigned LineNo, DICompileUnit CompileUnit, unsigned LineNo,
DIType Type) { DIType Ty) {
Value *Elts[] = { Value *Elts[] = {
GetTagConstant(Tag), GetTagConstant(Tag),
Context.getNode(), Context.getNode(),
MDString::get(VMContext, Name), MDString::get(VMContext, Name),
CompileUnit.getNode(), CompileUnit.getNode(),
ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), ConstantInt::get(Type::getInt32Ty(VMContext), LineNo),
Type.getNode(), Ty.getNode(),
}; };
return DIVariable(MDNode::get(VMContext, &Elts[0], 6)); return DIVariable(MDNode::get(VMContext, &Elts[0], 6));
} }
@ -962,14 +962,15 @@ DIVariable DIFactory::CreateComplexVariable(unsigned Tag, DIDescriptor Context,
const std::string &Name, const std::string &Name,
DICompileUnit CompileUnit, DICompileUnit CompileUnit,
unsigned LineNo, unsigned LineNo,
DIType Type, SmallVector<Value *, 9> &addr) { DIType Ty,
SmallVector<Value *, 9> &addr) {
SmallVector<Value *, 9> Elts; SmallVector<Value *, 9> Elts;
Elts.push_back(GetTagConstant(Tag)); Elts.push_back(GetTagConstant(Tag));
Elts.push_back(Context.getNode()); Elts.push_back(Context.getNode());
Elts.push_back(MDString::get(VMContext, Name)); Elts.push_back(MDString::get(VMContext, Name));
Elts.push_back(CompileUnit.getNode()); Elts.push_back(CompileUnit.getNode());
Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), LineNo)); Elts.push_back(ConstantInt::get(Type::getInt32Ty(VMContext), LineNo));
Elts.push_back(Type.getNode()); Elts.push_back(Ty.getNode());
Elts.insert(Elts.end(), addr.begin(), addr.end()); Elts.insert(Elts.end(), addr.begin(), addr.end());
return DIVariable(MDNode::get(VMContext, &Elts[0], 6+addr.size())); return DIVariable(MDNode::get(VMContext, &Elts[0], 6+addr.size()));
@ -1137,9 +1138,9 @@ void DebugInfoFinder::processType(DIType DT) {
if (!DA.isNull()) if (!DA.isNull())
for (unsigned i = 0, e = DA.getNumElements(); i != e; ++i) { for (unsigned i = 0, e = DA.getNumElements(); i != e; ++i) {
DIDescriptor D = DA.getElement(i); DIDescriptor D = DA.getElement(i);
DIType TypeE = DIType(D.getNode()); DIType TyE = DIType(D.getNode());
if (!TypeE.isNull()) if (!TyE.isNull())
processType(TypeE); processType(TyE);
else else
processSubprogram(DISubprogram(D.getNode())); processSubprogram(DISubprogram(D.getNode()));
} }