[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Oct 29 18:14:01 PST 2003


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.103 -> 1.104

---
Log message:

Make sure to print opaque types names if they are available.


---
Diffs of the changes:  (+5 -1)

Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.103 llvm/lib/VMCore/AsmWriter.cpp:1.104
--- llvm/lib/VMCore/AsmWriter.cpp:1.103	Mon Oct 20 14:43:20 2003
+++ llvm/lib/VMCore/AsmWriter.cpp	Wed Oct 29 18:12:51 2003
@@ -203,11 +203,15 @@
   // 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<OpaqueType>(Ty))
+    return Out << Ty->getDescription();
 
   // Check to see if the type is named.
   std::map<const Type *, std::string>::iterator I = TypeNames.find(Ty);
   if (I != TypeNames.end()) return Out << I->second;
+
+  if (isa<OpaqueType>(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





More information about the llvm-commits mailing list