diff options
author | Chris Lattner <sabre@nondot.org> | 2010-09-02 22:42:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-09-02 22:42:07 +0000 |
commit | 7e5c1a9790109ceb76576153c43a574c28fe0749 (patch) | |
tree | 4933b60a9488fd0721e613cb936ba9b3c110e610 | |
parent | 39653a4e6ccf624c0329e613e9e522f834410812 (diff) | |
download | external_llvm-7e5c1a9790109ceb76576153c43a574c28fe0749.zip external_llvm-7e5c1a9790109ceb76576153c43a574c28fe0749.tar.gz external_llvm-7e5c1a9790109ceb76576153c43a574c28fe0749.tar.bz2 |
revert patch, need to update clang tests too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112895 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 3168ec2..ce1b6f1 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1635,10 +1635,11 @@ void AssemblyWriter::printFunction(const Function *F) { if (F->hasGC()) Out << " gc \"" << F->getGC() << '"'; if (F->isDeclaration()) { - Out << '\n'; + Out << " ; [#uses=" << F->getNumUses() << "]\n"; // Output # uses } else { - Out << " {"; - // Output all of the function's basic blocks. + Out << " { ; [#uses=" << F->getNumUses() << ']'; // Output # uses + + // Output all of its basic blocks... for the function for (Function::const_iterator I = F->begin(), E = F->end(); I != E; ++I) printBasicBlock(I); @@ -1687,7 +1688,7 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { Out.PadToColumn(50); Out << "; Error: Block without parent!"; } else if (BB != &BB->getParent()->getEntryBlock()) { // Not the entry block? - // Output predecessors for the block. + // Output predecessors for the block... Out.PadToColumn(50); Out << ";"; const_pred_iterator PI = pred_begin(BB), PE = pred_end(BB); @@ -1725,6 +1726,13 @@ void AssemblyWriter::printInfoComment(const Value &V) { AnnotationWriter->printInfoComment(V, Out); return; } + + if (V.getType()->isVoidTy()) return; + + Out.PadToColumn(50); + Out << "; <"; + TypePrinter.print(V.getType(), Out); + Out << "> [#uses=" << V.getNumUses() << ']'; // Output # uses } // This member is called for each Instruction in a function.. |