Reapply: Add type output to llvm-dis annotations. Patch by Yuri!
authorStuart Hastings <stuart@apple.com>
Thu, 17 Mar 2011 19:50:04 +0000 (19:50 +0000)
committerStuart Hastings <stuart@apple.com>
Thu, 17 Mar 2011 19:50:04 +0000 (19:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127824 91177308-0d34-0410-b5e6-96231b3b80d8

test/Assembler/comment.ll
tools/llvm-dis/llvm-dis.cpp

index fe23d26fbeb4caa5d8f4ee426844331e8280f371..16362abc716f0dcc27a542399203b6cf514623f5 100644 (file)
@@ -7,7 +7,7 @@
 ; BARE: }
 
 @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 {
 entry:
@@ -15,6 +15,5 @@ entry:
   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>]
 
index d1ac9de3071ec0b87c58ffb6277578d39a0971ca..7453d9e9f457093543334a45aff6a898ee026cbe 100644 (file)
@@ -74,7 +74,7 @@ public:
     if (!V.getType()->isVoidTy()) {
       OS.PadToColumn(50);
       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)) {
       const DebugLoc &DL = I->getDebugLoc();