[llvm-commits] [llvm] r112895 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
Chris Lattner
sabre at nondot.org
Thu Sep 2 15:42:07 PDT 2010
Author: lattner
Date: Thu Sep 2 17:42:07 2010
New Revision: 112895
URL: http://llvm.org/viewvc/llvm-project?rev=112895&view=rev
Log:
revert patch, need to update clang tests too
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=112895&r1=112894&r2=112895&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Thu Sep 2 17:42:07 2010
@@ -1635,10 +1635,11 @@
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 @@
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 @@
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..
More information about the llvm-commits
mailing list