[llvm] r243157 - AsmPrinter: Use DICompositeType in updateAcceleratorTables(), NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Fri Jul 24 13:45:26 PDT 2015


Author: dexonsmith
Date: Fri Jul 24 15:45:26 2015
New Revision: 243157

URL: http://llvm.org/viewvc/llvm-project?rev=243157&view=rev
Log:
AsmPrinter: Use DICompositeType in updateAcceleratorTables(), NFC

`DISubroutineType` is impossible at this `dyn_cast` site, since we're
only dealing with named types and `DISubroutineType` cannot be named.
Strengthen the `dyn_cast` to `DICompositeType`.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=243157&r1=243156&r2=243157&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Fri Jul 24 15:45:26 2015
@@ -762,7 +762,7 @@ void DwarfUnit::updateAcceleratorTables(
                                         const DIType *Ty, const DIE &TyDIE) {
   if (!Ty->getName().empty() && !Ty->isForwardDecl()) {
     bool IsImplementation = 0;
-    if (auto *CT = dyn_cast<DICompositeTypeBase>(Ty)) {
+    if (auto *CT = dyn_cast<DICompositeType>(Ty)) {
       // A runtime language of 0 actually means C/C++ and that any
       // non-negative value is some version of Objective-C/C++.
       IsImplementation = CT->getRuntimeLang() == 0 || CT->isObjcClassComplete();





More information about the llvm-commits mailing list