[llvm-commits] [llvm] r78951 - /llvm/trunk/lib/VMCore/AsmWriter.cpp

Dan Gohman gohman at apple.com
Thu Aug 13 16:07:11 PDT 2009


Author: djg
Date: Thu Aug 13 18:07:11 2009
New Revision: 78951

URL: http://llvm.org/viewvc/llvm-project?rev=78951&view=rev
Log:
Take the fast path for any named value and any GlobalValue, which doesn't
need TypePrinting despite being a subclass of Constant. This fixes
compile-time problems especially visible on 403.gcc when -asm-verbose is
enabled.

Modified:
    llvm/trunk/lib/VMCore/AsmWriter.cpp

Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=78951&r1=78950&r2=78951&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Aug 13 18:07:11 2009
@@ -1233,7 +1233,8 @@
 
   // Fast path: Don't construct and populate a TypePrinting object if we
   // won't be needing any types printed.
-  if (!PrintType && !isa<Constant>(V)) {
+  if (!PrintType &&
+      (!isa<Constant>(V) || V->hasName() || isa<GlobalValue>(V))) {
     WriteAsOperandInternal(Out, V, 0, 0);
     return;
   }





More information about the llvm-commits mailing list