DI: Only DICompositeType has getElements(), NFC
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 4621ecbb510de65d0d59cceb0ad929777fd419a5..d05df017d7aec1618395ad24a9350d6480df9051 100644 (file)
@@ -187,7 +187,7 @@ const DIType *DbgVariable::getType() const {
     if (tag == dwarf::DW_TAG_pointer_type)
       subType = resolve(cast<DIDerivedType>(Ty)->getBaseType());
 
-    auto Elements = cast<DICompositeTypeBase>(subType)->getElements();
+    auto Elements = cast<DICompositeType>(subType)->getElements();
     for (unsigned i = 0, N = Elements.size(); i < N; ++i) {
       auto *DT = cast<DIDerivedTypeBase>(Elements[i]);
       if (getName() == DT->getName())