diff options
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 8270f1723f..35aae41e34 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; } |