Don't write out constants that do not have a name, they will be inlined.

llvm-svn: 305
This commit is contained in:
Chris Lattner 2001-07-26 16:29:38 +00:00
parent 252afbaf33
commit ee998be490
1 changed files with 5 additions and 5 deletions

View File

@ -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...