aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-13 23:07:11 +0000
committerDan Gohman <gohman@apple.com>2009-08-13 23:07:11 +0000
commitc4772a87a1dac399b0e4209274adde86e43e0cf6 (patch)
tree40638490d9f3c0f0230a35877c37d313f364f839
parent35b4707edb32008b1a7976dcbf3920b1160fc1c6 (diff)
downloadexternal_llvm-c4772a87a1dac399b0e4209274adde86e43e0cf6.zip
external_llvm-c4772a87a1dac399b0e4209274adde86e43e0cf6.tar.gz
external_llvm-c4772a87a1dac399b0e4209274adde86e43e0cf6.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78951 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 8270f17..35aae41 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1233,7 +1233,8 @@ void llvm::WriteAsOperand(raw_ostream &Out, const Value *V,
// 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;
}