diff options
author | Dan Gohman <dan433584@gmail.com> | 2013-06-12 22:19:19 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2013-06-12 22:19:19 +0000 |
commit | e5682816b7151b17331b0368c2c7bf19f6e3d661 (patch) | |
tree | 99c1bf293c2ca6b7ebd74d011196a545668addee /lib/CodeGen/MachineFunction.cpp | |
parent | a03a80f3ce75daca98445d568930771113ce06ef (diff) | |
download | llvm-e5682816b7151b17331b0368c2c7bf19f6e3d661.tar.gz llvm-e5682816b7151b17331b0368c2c7bf19f6e3d661.tar.bz2 llvm-e5682816b7151b17331b0368c2c7bf19f6e3d661.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183871 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 04321f3292..891e3b1004 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/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"; } |