File tree 1 file changed +12
-4
lines changed 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -474,18 +474,26 @@ void Module::dump() {
474
474
llvm::outs () << sb.str ();
475
475
}
476
476
477
- static std::string getDottyDesc (const Value *v ) {
477
+ static std::string getEscapedDottyType (const TypeRef& type ) {
478
478
std::string buffer;
479
479
llvm::raw_string_ostream stream (buffer);
480
- stream << v-> getKindName () << " | " << v-> getName () << " | " << *v-> getType () ;
480
+ stream << type ;
481
481
return escapeDottyString (stream.str ());
482
482
}
483
483
484
+ static std::string getDottyDesc (const Value *v) {
485
+ std::string buffer;
486
+ llvm::raw_string_ostream stream (buffer);
487
+ stream << v->getKindName () << " | " << v->getName () << " | "
488
+ << getEscapedDottyType (v->getType ());
489
+ return stream.str ();
490
+ }
491
+
484
492
static std::string getDottyDesc (const Instruction *II) {
485
493
std::string buffer;
486
494
llvm::raw_string_ostream stream (buffer);
487
495
stream << II->getKindName ();
488
- stream << " |" << II->getType () << " |" ;
496
+ stream << " |" << getEscapedDottyType ( II->getType () ) << " |" ;
489
497
490
498
// Print operands:
491
499
for (int i = 0 , e = II->getNumOperands (); i < e; i++) {
@@ -497,7 +505,7 @@ static std::string getDottyDesc(const Instruction *II) {
497
505
stream << op.first ->getName ();
498
506
}
499
507
500
- return escapeDottyString ( stream.str () );
508
+ return stream.str ();
501
509
}
502
510
503
511
// / \returns the arrow property for the operand kind \p k. This method is used
You can’t perform that action at this time.
0 commit comments