diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 7fde1220359..2cdca502dc6 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -203,12 +203,16 @@ static std::ostream &printTypeInt(std::ostream &Out, const Type *Ty, // Primitive types always print out their description, regardless of whether // they have been named or not. // - if (Ty->isPrimitiveType()) return Out << Ty->getDescription(); + if (Ty->isPrimitiveType() && !isa(Ty)) + return Out << Ty->getDescription(); // Check to see if the type is named. std::map::iterator I = TypeNames.find(Ty); if (I != TypeNames.end()) return Out << I->second; + if (isa(Ty)) + return Out << "opaque"; + // Otherwise we have a type that has not been named but is a derived type. // Carefully recurse the type hierarchy to print out any contained symbolic // names.