From 69917e27af9248cbce98bb56f1e1b5286aede759 Mon Sep 17 00:00:00 2001 From: Ruchira Sasanka Date: Thu, 18 Oct 2001 22:40:02 +0000 Subject: [PATCH] Added implict operand printing for operator( ostream, MachineInstr&) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@912 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 76fd4e7c835..2ec791f11b6 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -19,6 +19,7 @@ #include "llvm/Instruction.h" + //************************ Class Implementations **************************/ // Constructor for instructions with fixed #operands (nearly all) @@ -100,6 +101,25 @@ operator<< (ostream& os, const MachineInstr& minstr) } #endif + + +#if 1 + // code for printing implict references + + unsigned NumOfImpRefs = minstr.getNumImplicitRefs(); + if( NumOfImpRefs > 0 ) { + + os << "\tImplicit:"; + + for(unsigned z=0; z < NumOfImpRefs; z++) { + os << minstr.getImplicitRef(z); + cout << "\t"; + } + } + +#endif + + os << endl; return os; -- 2.34.1