mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -930,6 +930,20 @@ bool DwarfDebug::addConstantValue(DIE *Die, ConstantInt *CI,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// addTemplateParams - Add template parameters in buffer.
|
||||||
|
void DwarfDebug::addTemplateParams(DIE &Buffer, DIArray TParams) {
|
||||||
|
// Add template parameters.
|
||||||
|
for (unsigned i = 0, e = TParams.getNumElements(); i != e; ++i) {
|
||||||
|
DIDescriptor Element = TParams.getElement(i);
|
||||||
|
if (Element.isTemplateTypeParameter())
|
||||||
|
Buffer.addChild(getOrCreateTemplateTypeParameterDIE(
|
||||||
|
DITemplateTypeParameter(Element)));
|
||||||
|
else if (Element.isTemplateValueParameter())
|
||||||
|
Buffer.addChild(getOrCreateTemplateValueParameterDIE(
|
||||||
|
DITemplateValueParameter(Element)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
/// addToContextOwner - Add Die into the list of its context owner's children.
|
/// addToContextOwner - Add Die into the list of its context owner's children.
|
||||||
void DwarfDebug::addToContextOwner(DIE *Die, DIDescriptor Context) {
|
void DwarfDebug::addToContextOwner(DIE *Die, DIDescriptor Context) {
|
||||||
if (Context.isType()) {
|
if (Context.isType()) {
|
||||||
@ -1155,20 +1169,9 @@ void DwarfDebug::constructTypeDIE(DIE &Buffer, DICompositeType CTy) {
|
|||||||
addToContextOwner(&Buffer, Context);
|
addToContextOwner(&Buffer, Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tag == dwarf::DW_TAG_class_type) {
|
if (Tag == dwarf::DW_TAG_class_type)
|
||||||
DIArray TParams = CTy.getTemplateParams();
|
addTemplateParams(Buffer, CTy.getTemplateParams());
|
||||||
unsigned N = TParams.getNumElements();
|
|
||||||
// Add template parameters.
|
|
||||||
for (unsigned i = 0; i < N; ++i) {
|
|
||||||
DIDescriptor Element = TParams.getElement(i);
|
|
||||||
if (Element.isTemplateTypeParameter())
|
|
||||||
Buffer.addChild(getOrCreateTemplateTypeParameterDIE(
|
|
||||||
DITemplateTypeParameter(Element)));
|
|
||||||
else if (Element.isTemplateValueParameter())
|
|
||||||
Buffer.addChild(getOrCreateTemplateValueParameterDIE(
|
|
||||||
DITemplateValueParameter(Element)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -39,7 +39,7 @@ class DIEAbbrev;
|
|||||||
class DIE;
|
class DIE;
|
||||||
class DIEBlock;
|
class DIEBlock;
|
||||||
class DIEEntry;
|
class DIEEntry;
|
||||||
|
class DIArray;
|
||||||
class DIEnumerator;
|
class DIEnumerator;
|
||||||
class DIDescriptor;
|
class DIDescriptor;
|
||||||
class DIVariable;
|
class DIVariable;
|
||||||
@ -320,6 +320,9 @@ private:
|
|||||||
/// addConstantFPValue - Add constant value entry in variable DIE.
|
/// addConstantFPValue - Add constant value entry in variable DIE.
|
||||||
bool addConstantFPValue(DIE *Die, const MachineOperand &MO);
|
bool addConstantFPValue(DIE *Die, const MachineOperand &MO);
|
||||||
|
|
||||||
|
/// addTemplateParams - Add template parameters in buffer.
|
||||||
|
void addTemplateParams(DIE &Buffer, DIArray TParams);
|
||||||
|
|
||||||
/// addComplexAddress - Start with the address based on the location provided,
|
/// addComplexAddress - Start with the address based on the location provided,
|
||||||
/// and generate the DWARF information necessary to find the actual variable
|
/// and generate the DWARF information necessary to find the actual variable
|
||||||
/// (navigating the extra location information encoded in the type) based on
|
/// (navigating the extra location information encoded in the type) based on
|
||||||
|
Reference in New Issue
Block a user