diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-07-26 16:29:38 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-07-26 16:29:38 +0000 |
| commit | ee998be49057145702cb642ad6eb1da570683974 (patch) | |
| tree | b4cfb09dd07abc366b6033eba8b2bf107b45b115 /llvm/lib | |
| parent | 252afbaf33424717c69694d55f5fc65f2221bd59 (diff) | |
| download | bcm5719-llvm-ee998be49057145702cb642ad6eb1da570683974.tar.gz bcm5719-llvm-ee998be49057145702cb642ad6eb1da570683974.zip | |
Don't write out constants that do not have a name, they will be inlined.
llvm-svn: 305
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index cc62e6007df..9c66339f21e 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/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... |

