Print ConstantPoolSDNode offset field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26381 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2006-02-26 08:36:57 +00:00
parent a09bd8190c
commit 38b7327ec0

View File

@ -2761,7 +2761,12 @@ void SDNode::dump(const SelectionDAG *G) const {
} else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(this)) {
std::cerr << "<" << FIDN->getIndex() << ">";
} else if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(this)){
int offset = CP->getOffset();
std::cerr << "<" << *CP->get() << ">";
if (offset > 0)
std::cerr << " + " << offset;
else
std::cerr << " " << offset;
} else if (const BasicBlockSDNode *BBDN = dyn_cast<BasicBlockSDNode>(this)) {
std::cerr << "<";
const Value *LBB = (const Value*)BBDN->getBasicBlock()->getBasicBlock();