X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FSelectionDAG%2FSelectionDAGPrinter.cpp;h=f1883744129467d77364227e9182d91ad4f6b175;hb=ef5b199905cee0b78eb30cd44836e5b6ca5cbd09;hp=caeaa838e9a8961341bb6aafc7fc1e0c68b775eb;hpb=056292fd738924f3f7703725d8f630983794b5a5;p=oota-llvm.git diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index caeaa838e9a..f1883744129 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -126,12 +126,13 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, Op += ": " + ftostr(CSDN->getValueAPF()); } else if (const GlobalAddressSDNode *GADN = dyn_cast(Node)) { - int offset = GADN->getOffset(); Op += ": " + GADN->getGlobal()->getName(); - if (offset > 0) - Op += "+" + itostr(offset); - else - Op += itostr(offset); + if (int64_t Offset = GADN->getOffset()) { + if (Offset > 0) + Op += "+" + itostr(Offset); + else + Op += itostr(Offset); + } } else if (const FrameIndexSDNode *FIDN = dyn_cast(Node)) { Op += " " + itostr(FIDN->getIndex()); } else if (const JumpTableSDNode *JTDN = dyn_cast(Node)) {