summaryrefslogtreecommitdiffstats
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
commit0809712def6a42bd419491185df7df932810f44d (patch)
treea7603f6e976be081a6f473983cb12f7fec95ac0a
parentc2f591b1e639a7be6e88f1b55484462b1861bbf4 (diff)
downloadbcm5719-llvm-0809712def6a42bd419491185df7df932810f44d.tar.gz
bcm5719-llvm-0809712def6a42bd419491185df7df932810f44d.zip
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. llvm-svn: 78951
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 8270f1723fc..35aae41e349 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud