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 | 1333ed5b4fd3d30ba9ef56741af4d345a9e43953 (patch) | |
tree | 8dea2cd3e73f3f11db2a73fb5801dc661ecc8143 /lib | |
parent | bcbf6baf10c34086594bc03f0002a8977cd66941 (diff) | |
download | external_llvm-1333ed5b4fd3d30ba9ef56741af4d345a9e43953.zip external_llvm-1333ed5b4fd3d30ba9ef56741af4d345a9e43953.tar.gz external_llvm-1333ed5b4fd3d30ba9ef56741af4d345a9e43953.tar.bz2 |
Don't write out constants that do not have a name, they will be inlined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 10 |
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... |