From 668aff66232d17731153c5af1cc45aa4d351f00b Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 18 Oct 2008 18:22:42 +0000 Subject: [PATCH] Don't truncate GlobalAddress offsets to int in debug output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57770 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 07819404e14..c223a8f6472 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5318,7 +5318,7 @@ void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const { } } else if (const GlobalAddressSDNode *GADN = dyn_cast(this)) { - int offset = GADN->getOffset(); + int64_t offset = GADN->getOffset(); OS << '<'; WriteAsOperand(OS, GADN->getGlobal()); OS << '>'; diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 410f6157358..f1883744129 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -127,7 +127,7 @@ std::string DOTGraphTraits::getNodeLabel(const SDNode *Node, } else if (const GlobalAddressSDNode *GADN = dyn_cast(Node)) { Op += ": " + GADN->getGlobal()->getName(); - if (int Offset = GADN->getOffset()) { + if (int64_t Offset = GADN->getOffset()) { if (Offset > 0) Op += "+" + itostr(Offset); else