summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2013-06-12 22:19:19 +0000
committerDan Gohman <dan433584@gmail.com>2013-06-12 22:19:19 +0000
commit6a0c9ae4f93fd29b7bae48513674ab18dda73f9e (patch)
tree9116543c6bd61689979d31338ad88835b9245bea
parent2e3c4025aee0a22845fbbcf688b801feccb23042 (diff)
downloadbcm5719-llvm-6a0c9ae4f93fd29b7bae48513674ab18dda73f9e.tar.gz
bcm5719-llvm-6a0c9ae4f93fd29b7bae48513674ab18dda73f9e.zip
Print ConstantPool entries initialized to Values with WriteAsOperand instead of
operator<< so that functions are printed as just their name instead of as their entire definition, which is excessively verbose in this context. llvm-svn: 183871
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 04321f32928..891e3b10043 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -17,6 +17,7 @@
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Analysis/ConstantFolding.h"
+#include "llvm/Assembly/Writer.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
@@ -887,7 +888,7 @@ void MachineConstantPool::print(raw_ostream &OS) const {
if (Constants[i].isMachineConstantPoolEntry())
Constants[i].Val.MachineCPVal->print(OS);
else
- OS << *(const Value*)Constants[i].Val.ConstVal;
+ WriteAsOperand(OS, Constants[i].Val.ConstVal, /*PrintType=*/false);
OS << ", align=" << Constants[i].getAlignment();
OS << "\n";
}
OpenPOWER on IntegriCloud