DebugInfo: Remove DIArray and DITypeArray typedefs
Remove the `DIArray` and `DITypeArray` typedefs, preferring the
underlying types (`DebugNodeArray` and `MDTypeRefArray`, respectively).
llvm-svn: 235413
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index e661ddc..dbaf1c6 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -570,7 +570,7 @@
DIE &ScopeDIE = updateSubprogramScopeDIE(Sub);
// If this is a variadic function, add an unspecified parameter.
- DITypeArray FnArgs = Sub->getType()->getTypeArray();
+ MDTypeRefArray FnArgs = Sub->getType()->getTypeArray();
// Collect lexical scope children first.
// ObjectPointer might be a local (non-argument) local variable if it's a
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index ad1ef54..6e00ed8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -474,7 +474,7 @@
// Find the __forwarding field and the variable field in the __Block_byref
// struct.
- DIArray Fields = cast<MDCompositeTypeBase>(TmpTy)->getElements();
+ DebugNodeArray Fields = cast<MDCompositeTypeBase>(TmpTy)->getElements();
const MDDerivedType *varField = nullptr;
const MDDerivedType *forwardingField = nullptr;
@@ -695,7 +695,7 @@
GlobalValue::getRealLinkageName(LinkageName));
}
-void DwarfUnit::addTemplateParams(DIE &Buffer, DIArray TParams) {
+void DwarfUnit::addTemplateParams(DIE &Buffer, DebugNodeArray TParams) {
// Add template parameters.
for (const auto *Element : TParams) {
if (auto *TTP = dyn_cast<MDTemplateTypeParameter>(Element))
@@ -900,7 +900,7 @@
addSourceLine(Buffer, DTy);
}
-void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DITypeArray Args) {
+void DwarfUnit::constructSubprogramArguments(DIE &Buffer, MDTypeRefArray Args) {
for (unsigned i = 1, N = Args.size(); i < N; ++i) {
const MDType *Ty = resolve(Args[i]);
if (!Ty) {
@@ -961,7 +961,7 @@
case dwarf::DW_TAG_union_type:
case dwarf::DW_TAG_class_type: {
// Add elements to structure type.
- DIArray Elements = CTy->getElements();
+ DebugNodeArray Elements = CTy->getElements();
for (const auto *Element : Elements) {
if (!Element)
continue;
@@ -1316,7 +1316,7 @@
DIE *IdxTy = getIndexTyDie();
// Add subranges to array type.
- DIArray Elements = CTy->getElements();
+ DebugNodeArray Elements = CTy->getElements();
for (unsigned i = 0, N = Elements.size(); i < N; ++i) {
// FIXME: Should this really be such a loose cast?
if (auto *Element = dyn_cast_or_null<DebugNode>(Elements[i]))
@@ -1326,7 +1326,7 @@
}
void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, const MDCompositeType *CTy) {
- DIArray Elements = CTy->getElements();
+ DebugNodeArray Elements = CTy->getElements();
// Add enumerators to enumeration type.
for (unsigned i = 0, N = Elements.size(); i < N; ++i) {
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index 7041f37..1cbf348 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -268,7 +268,7 @@
void addLinkageName(DIE &Die, StringRef LinkageName);
/// \brief Add template parameters in buffer.
- void addTemplateParams(DIE &Buffer, DIArray TParams);
+ void addTemplateParams(DIE &Buffer, DebugNodeArray TParams);
/// \brief Add register operand.
/// \returns false if the register does not exist, e.g., because it was never
@@ -316,7 +316,7 @@
void constructContainingTypeDIEs();
/// \brief Construct function argument DIEs.
- void constructSubprogramArguments(DIE &Buffer, DITypeArray Args);
+ void constructSubprogramArguments(DIE &Buffer, MDTypeRefArray Args);
/// Create a DIE with the given Tag, add the DIE to its parent, and
/// call insertDIE if MD is not null.