diff options
author | Dan Gohman <gohman@apple.com> | 2009-03-10 18:47:59 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-03-10 18:47:59 +0000 |
commit | ac57b128c4846bdbd82a43b0f5f04a879aa94b08 (patch) | |
tree | 6618ac26d53a7a8aa9c9f9af541b57cd31b83061 /lib/VMCore/PassManager.cpp | |
parent | 1274ced8a3f0fd1e9a6f7c7e17d69368c4f78b90 (diff) |
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
Diffstat (limited to 'lib/VMCore/PassManager.cpp')
-rw-r--r-- | lib/VMCore/PassManager.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 174aa474df..dd035487be 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -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"; } |