summaryrefslogtreecommitdiff
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-02 22:52:10 +0000
committerChris Lattner <sabre@nondot.org>2010-09-02 22:52:10 +0000
commit91fb4070e58566c5406b65bf70719c3e580eb027 (patch)
treecaad95ada784117cfdd930bdb086d1d7a3c684d0 /lib/VMCore/AsmWriter.cpp
parented5c711a6e1b3d03952c670c5c0c1c3ed6c63ad4 (diff)
downloadllvm-91fb4070e58566c5406b65bf70719c3e580eb027.tar.gz
llvm-91fb4070e58566c5406b65bf70719c3e580eb027.tar.bz2
llvm-91fb4070e58566c5406b65bf70719c3e580eb027.tar.xz
reapply 112894:
Remove #uses comments from functions: they we're padded out to column 50 and were potentially confusing for externally visible functions. going further, remove the "<i8**> [#uses=3]" comments entirely. They add a lot of noise, confuse people about what the IR is, and don't add any particular value. When the types are long it makes it really really hard to read IR. If someone is interested in this sort of thing, the right way to do this is to implement an AsmAnnotationWriter that produces the same output, and add a flag to llvm-dis (only) to produce this output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index ce1b6f1e21..3168ec2aa4 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -1635,11 +1635,10 @@ void AssemblyWriter::printFunction(const Function *F) {
if (F->hasGC())
Out << " gc \"" << F->getGC() << '"';
if (F->isDeclaration()) {
- Out << " ; [#uses=" << F->getNumUses() << "]\n"; // Output # uses
+ Out << '\n';
} else {
- Out << " { ; [#uses=" << F->getNumUses() << ']'; // Output # uses
-
- // Output all of its basic blocks... for the function
+ Out << " {";
+ // Output all of the function's basic blocks.
for (Function::const_iterator I = F->begin(), E = F->end(); I != E; ++I)
printBasicBlock(I);
@@ -1688,7 +1687,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);
@@ -1726,13 +1725,6 @@ 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..