mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
don't print GlobalAddressSDNode's with an offset of zero as "foo0".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e306b3d0d9
commit
ca19a3fd11
@ -126,12 +126,13 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
|
|||||||
Op += ": " + ftostr(CSDN->getValueAPF());
|
Op += ": " + ftostr(CSDN->getValueAPF());
|
||||||
} else if (const GlobalAddressSDNode *GADN =
|
} else if (const GlobalAddressSDNode *GADN =
|
||||||
dyn_cast<GlobalAddressSDNode>(Node)) {
|
dyn_cast<GlobalAddressSDNode>(Node)) {
|
||||||
int offset = GADN->getOffset();
|
|
||||||
Op += ": " + GADN->getGlobal()->getName();
|
Op += ": " + GADN->getGlobal()->getName();
|
||||||
if (offset > 0)
|
if (int Offset = GADN->getOffset()) {
|
||||||
Op += "+" + itostr(offset);
|
if (Offset > 0)
|
||||||
|
Op += "+" + itostr(Offset);
|
||||||
else
|
else
|
||||||
Op += itostr(offset);
|
Op += itostr(Offset);
|
||||||
|
}
|
||||||
} else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(Node)) {
|
} else if (const FrameIndexSDNode *FIDN = dyn_cast<FrameIndexSDNode>(Node)) {
|
||||||
Op += " " + itostr(FIDN->getIndex());
|
Op += " " + itostr(FIDN->getIndex());
|
||||||
} else if (const JumpTableSDNode *JTDN = dyn_cast<JumpTableSDNode>(Node)) {
|
} else if (const JumpTableSDNode *JTDN = dyn_cast<JumpTableSDNode>(Node)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user