mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 06:06:32 +00:00
Use WriteAsOperand instead of manually decorating the name for this
debug output. This improves the printing of anonymous values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66561 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1274ced8a3
commit
ac57b128c4
@ -77,20 +77,17 @@ void PassManagerPrettyStackEntry::print(raw_ostream &OS) const {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string Name = V->getNameStr();
|
||||
if (Name.empty())
|
||||
Name = "<anonymous>";
|
||||
else if (isa<GlobalValue>(V))
|
||||
Name = "@" + Name;
|
||||
else
|
||||
Name = "%" + Name;
|
||||
|
||||
OS << " on ";
|
||||
if (isa<Function>(V))
|
||||
OS << " on function '" << Name << "'\n";
|
||||
OS << "function";
|
||||
else if (isa<BasicBlock>(V))
|
||||
OS << " on basic block '" << Name << "'\n";
|
||||
OS << "basic block";
|
||||
else
|
||||
OS << " on value '" << Name << "'\n";
|
||||
OS << "value";
|
||||
|
||||
OS << " '";
|
||||
WriteAsOperand(OS, V, /*PrintTy=*/false, M);
|
||||
OS << "'\n";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user