doc: "used" attribute saves decls from linker garbage collection
[gcc.git] / gcc / d / imports.cc
index 2e3eb7408b76d17992ad556cee489d29632612a6..34cd5e1fdd293d438707f5033e4da22dc53b97a2 100644 (file)
@@ -131,11 +131,11 @@ public:
        if (type != NULL)
          {
            if (type->ty == Tenum)
-             dsym = ((TypeEnum *) type)->sym;
+             dsym = type->isTypeEnum ()->sym;
            else if (type->ty == Tstruct)
-             dsym = ((TypeStruct *) type)->sym;
+             dsym = type->isTypeStruct ()->sym;
            else if (type->ty == Tclass)
-             dsym = ((TypeClass *) type)->sym;
+             dsym = type->isTypeClass ()->sym;
          }
       }
 
@@ -202,7 +202,7 @@ build_import_decl (Dsymbol *d)
       input_location = saved_location;
     }
 
-  /* Not all visitors set 'isym'.  */
+  /* Not all visitors set `isym'.  */
   return d->isym ? d->isym : NULL_TREE;
 }