Use WriteAsOperand instead of manually decorating the name for this
debug output. This improves the printing of anonymous values. llvm-svn: 66561
This commit is contained in:
parent
65b2c4c381
commit
79fc0e9250
|
@ -77,20 +77,17 @@ void PassManagerPrettyStackEntry::print(raw_ostream &OS) const {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Name = V->getNameStr();
|
OS << " on ";
|
||||||
if (Name.empty())
|
|
||||||
Name = "<anonymous>";
|
|
||||||
else if (isa<GlobalValue>(V))
|
|
||||||
Name = "@" + Name;
|
|
||||||
else
|
|
||||||
Name = "%" + Name;
|
|
||||||
|
|
||||||
if (isa<Function>(V))
|
if (isa<Function>(V))
|
||||||
OS << " on function '" << Name << "'\n";
|
OS << "function";
|
||||||
else if (isa<BasicBlock>(V))
|
else if (isa<BasicBlock>(V))
|
||||||
OS << " on basic block '" << Name << "'\n";
|
OS << "basic block";
|
||||||
else
|
else
|
||||||
OS << " on value '" << Name << "'\n";
|
OS << "value";
|
||||||
|
|
||||||
|
OS << " '";
|
||||||
|
WriteAsOperand(OS, V, /*PrintTy=*/false, M);
|
||||||
|
OS << "'\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue