comparison tools/llvm-diff/DiffConsumer.cpp @ 122:36195a0db682

merging ( incomplete )
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Nov 2017 20:32:31 +0900
parents 803732b1fca8
children 3a76565eade5
comparison
equal deleted inserted replaced
119:d9df2cbd60cd 122:36195a0db682
13 13
14 #include "DiffConsumer.h" 14 #include "DiffConsumer.h"
15 #include "llvm/IR/Instructions.h" 15 #include "llvm/IR/Instructions.h"
16 #include "llvm/IR/Module.h" 16 #include "llvm/IR/Module.h"
17 #include "llvm/Support/ErrorHandling.h" 17 #include "llvm/Support/ErrorHandling.h"
18 #include "llvm/Support/Debug.h"
18 19
19 using namespace llvm; 20 using namespace llvm;
20 21
21 static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){ 22 static void ComputeNumbering(Function *F, DenseMap<Value*,unsigned> &Numbering){
22 unsigned IN = 0; 23 unsigned IN = 0;
193 for (unsigned I = 0, E = Log.getNumLines(); I != E; ++I) { 194 for (unsigned I = 0, E = Log.getNumLines(); I != E; ++I) {
194 indent(); 195 indent();
195 switch (Log.getLineKind(I)) { 196 switch (Log.getLineKind(I)) {
196 case DC_match: 197 case DC_match:
197 out << " "; 198 out << " ";
198 Log.getLeft(I)->dump(); 199 Log.getLeft(I)->print(dbgs()); dbgs() << '\n';
199 //printValue(Log.getLeft(I), true); 200 //printValue(Log.getLeft(I), true);
200 break; 201 break;
201 case DC_left: 202 case DC_left:
202 out << "< "; 203 out << "< ";
203 Log.getLeft(I)->dump(); 204 Log.getLeft(I)->print(dbgs()); dbgs() << '\n';
204 //printValue(Log.getLeft(I), true); 205 //printValue(Log.getLeft(I), true);
205 break; 206 break;
206 case DC_right: 207 case DC_right:
207 out << "> "; 208 out << "> ";
208 Log.getRight(I)->dump(); 209 Log.getRight(I)->print(dbgs()); dbgs() << '\n';
209 //printValue(Log.getRight(I), false); 210 //printValue(Log.getRight(I), false);
210 break; 211 break;
211 } 212 }
212 //out << "\n"; 213 //out << "\n";
213 } 214 }