Reapply: Add type output to llvm-dis annotations. Patch by Yuri!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stuart Hastings
2011-03-17 19:50:04 +00:00
parent 11bd0784d9
commit c74513d1b6
2 changed files with 3 additions and 4 deletions

View File

@ -7,7 +7,7 @@
; BARE: } ; BARE: }
@B = external global i32 @B = external global i32
; ANNOT: @B = external global i32 ; [#uses=0] ; ANNOT: @B = external global i32 ; [#uses=0 type=i32*]
define <4 x i1> @foo(<4 x float> %a, <4 x float> %b) nounwind { define <4 x i1> @foo(<4 x float> %a, <4 x float> %b) nounwind {
entry: entry:
@ -15,6 +15,5 @@ entry:
ret <4 x i1> %cmp ret <4 x i1> %cmp
} }
; ANNOT: %cmp = fcmp olt <4 x float> %a, %b ; [#uses=1] ; ANNOT: %cmp = fcmp olt <4 x float> %a, %b ; [#uses=1 type=<4 x i1>]

View File

@ -74,7 +74,7 @@ public:
if (!V.getType()->isVoidTy()) { if (!V.getType()->isVoidTy()) {
OS.PadToColumn(50); OS.PadToColumn(50);
Padded = true; Padded = true;
OS << "; [#uses=" << V.getNumUses() << ']'; // Output # uses OS << "; [#uses=" << V.getNumUses() << " type=" << V.getType()->getDescription() << "]"; // Output # uses and type
} }
if (const Instruction *I = dyn_cast<Instruction>(&V)) { if (const Instruction *I = dyn_cast<Instruction>(&V)) {
const DebugLoc &DL = I->getDebugLoc(); const DebugLoc &DL = I->getDebugLoc();