aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index cc62e60..9c66339 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -129,13 +129,13 @@ bool AssemblyWriter::processConstPool(const ConstantPool &CP, bool isMethod) {
// processConstant - Print out a constant pool entry...
//
bool AssemblyWriter::processConstant(const ConstPoolVal *CPV) {
- Out << "\t";
+ if (!CPV->hasName())
+ return false; // Don't print out unnamed constants, they will be inlined
- // Print out name if it exists...
- if (CPV->hasName())
- Out << "%" << CPV->getName() << " = ";
+ // Print out name...
+ Out << "\t%" << CPV->getName() << " = ";
- // Print out the opcode...
+ // Print out the constant type...
Out << CPV->getType();
// Write the value out now...