[llvm] r193284 - Debug Info: code clean up.
Manman Ren
manman.ren at gmail.com
Wed Oct 23 15:52:22 PDT 2013
Author: mren
Date: Wed Oct 23 17:52:22 2013
New Revision: 193284
URL: http://llvm.org/viewvc/llvm-project?rev=193284&view=rev
Log:
Debug Info: code clean up.
Unifying the argument ordering of private construct functions in CompileUnit to
follow constructTypeDIE(DIE &, DIBasicType),
constructTypeDIE(DIE &, DIDerivedType), constructTypeDIE(DIE &, DICompositeType),
constructSubrangeDIE and constructArrayTypeDIE.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp?rev=193284&r1=193283&r2=193284&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Wed Oct 23 17:52:22 2013
@@ -796,11 +796,11 @@ void CompileUnit::addTemplateParams(DIE
for (unsigned i = 0, e = TParams.getNumElements(); i != e; ++i) {
DIDescriptor Element = TParams.getElement(i);
if (Element.isTemplateTypeParameter())
- getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter(Element),
- Buffer);
+ getOrCreateTemplateTypeParameterDIE(Buffer,
+ DITemplateTypeParameter(Element));
else if (Element.isTemplateValueParameter())
- getOrCreateTemplateValueParameterDIE(DITemplateValueParameter(Element),
- Buffer);
+ getOrCreateTemplateValueParameterDIE(Buffer,
+ DITemplateValueParameter(Element));
}
}
@@ -1096,7 +1096,7 @@ void CompileUnit::constructTypeDIE(DIE &
for (unsigned i = 0, N = Elements.getNumElements(); i < N; ++i) {
DIDescriptor Enum(Elements.getElement(i));
if (Enum.isEnumerator())
- constructEnumTypeDIE(DIEnumerator(Enum), Buffer);
+ constructEnumTypeDIE(Buffer, DIEnumerator(Enum));
}
DIType DTy = resolve(CTy.getTypeDerivedFrom());
if (DTy) {
@@ -1167,7 +1167,7 @@ void CompileUnit::constructTypeDIE(DIE &
} else if (DDTy.isStaticMember()) {
ElemDie = getOrCreateStaticMemberDIE(DDTy);
} else {
- ElemDie = createMemberDIE(DDTy, Buffer);
+ ElemDie = createMemberDIE(Buffer, DDTy);
}
} else if (Element.isObjCProperty()) {
DIObjCProperty Property(Element);
@@ -1270,8 +1270,8 @@ void CompileUnit::constructTypeDIE(DIE &
/// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE
/// for the given DITemplateTypeParameter.
DIE *
-CompileUnit::getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP,
- DIE &Buffer) {
+CompileUnit::getOrCreateTemplateTypeParameterDIE(DIE &Buffer,
+ DITemplateTypeParameter TP) {
DIE *ParamDIE = getDIE(TP);
if (ParamDIE)
return ParamDIE;
@@ -1289,8 +1289,8 @@ CompileUnit::getOrCreateTemplateTypePara
/// getOrCreateTemplateValueParameterDIE - Find existing DIE or create new DIE
/// for the given DITemplateValueParameter.
DIE *
-CompileUnit::getOrCreateTemplateValueParameterDIE(DITemplateValueParameter VP,
- DIE &Buffer) {
+CompileUnit::getOrCreateTemplateValueParameterDIE(DIE &Buffer,
+ DITemplateValueParameter VP) {
DIE *ParamDIE = getDIE(VP);
if (ParamDIE)
return ParamDIE;
@@ -1687,7 +1687,7 @@ void CompileUnit::constructArrayTypeDIE(
}
/// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
-DIE *CompileUnit::constructEnumTypeDIE(DIEnumerator ETy, DIE &Buffer) {
+DIE *CompileUnit::constructEnumTypeDIE(DIE &Buffer, DIEnumerator ETy) {
DIE *Enumerator = new DIE(dwarf::DW_TAG_enumerator);
Buffer.addChild(Enumerator);
StringRef Name = ETy.getName();
@@ -1788,7 +1788,7 @@ DIE *CompileUnit::constructVariableDIE(D
}
/// createMemberDIE - Create new member DIE.
-DIE *CompileUnit::createMemberDIE(DIDerivedType DT, DIE &Buffer) {
+DIE *CompileUnit::createMemberDIE(DIE &Buffer, DIDerivedType DT) {
DIE *MemberDie = new DIE(DT.getTag());
Buffer.addChild(MemberDie);
StringRef Name = DT.getName();
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=193284&r1=193283&r2=193284&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Wed Oct 23 17:52:22 2013
@@ -328,20 +328,20 @@ private:
void constructArrayTypeDIE(DIE &Buffer, DICompositeType *CTy);
/// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator.
- DIE *constructEnumTypeDIE(DIEnumerator ETy, DIE &Buffer);
+ DIE *constructEnumTypeDIE(DIE &Buffer, DIEnumerator ETy);
/// createMemberDIE - Create new member DIE.
- DIE *createMemberDIE(DIDerivedType DT, DIE &Buffer);
+ DIE *createMemberDIE(DIE &Buffer, DIDerivedType DT);
/// getOrCreateTemplateTypeParameterDIE - Find existing DIE or create new DIE
/// for the given DITemplateTypeParameter.
- DIE *getOrCreateTemplateTypeParameterDIE(DITemplateTypeParameter TP,
- DIE &Buffer);
+ DIE *getOrCreateTemplateTypeParameterDIE(DIE &Buffer,
+ DITemplateTypeParameter TP);
/// getOrCreateTemplateValueParameterDIE - Find existing DIE or create
/// new DIE for the given DITemplateValueParameter.
- DIE *getOrCreateTemplateValueParameterDIE(DITemplateValueParameter TVP,
- DIE &Buffer);
+ DIE *getOrCreateTemplateValueParameterDIE(DIE &Buffer,
+ DITemplateValueParameter TVP);
/// getOrCreateStaticMemberDIE - Create new static data member DIE.
DIE *getOrCreateStaticMemberDIE(DIDerivedType DT);
More information about the llvm-commits
mailing list