Don't truncate GlobalAddress offsets to int in debug output.
authorDan Gohman <gohman@apple.com>
Sat, 18 Oct 2008 18:22:42 +0000 (18:22 +0000)
committerDan Gohman <gohman@apple.com>
Sat, 18 Oct 2008 18:22:42 +0000 (18:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57770 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index 07819404e14407ee131f75f862e4527cf5f5c8f5..c223a8f64727f1dd6effadc04937b774933323cd 100644 (file)
@@ -5318,7 +5318,7 @@ void SDNode::print(raw_ostream &OS, const SelectionDAG *G) const {
     }
   } else if (const GlobalAddressSDNode *GADN =
              dyn_cast<GlobalAddressSDNode>(this)) {
-    int offset = GADN->getOffset();
+    int64_t offset = GADN->getOffset();
     OS << '<';
     WriteAsOperand(OS, GADN->getGlobal());
     OS << '>';
index 410f6157358a45c0a47b2c378cd912f4b5ba0041..f1883744129467d77364227e9182d91ad4f6b175 100644 (file)
@@ -127,7 +127,7 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
   } else if (const GlobalAddressSDNode *GADN =
              dyn_cast<GlobalAddressSDNode>(Node)) {
     Op += ": " + GADN->getGlobal()->getName();
-    if (int Offset = GADN->getOffset()) {
+    if (int64_t Offset = GADN->getOffset()) {
       if (Offset > 0)
         Op += "+" + itostr(Offset);
       else