fix constant pointer outputing on 64 bit machines
authorAndrew Lenharth <andrewl@lenharth.org>
Fri, 4 Feb 2005 13:47:16 +0000 (13:47 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Fri, 4 Feb 2005 13:47:16 +0000 (13:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20026 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter.cpp

index 96d9492c3076fba54178a5d2c3dab85fe9a5f674..80f67023f4311e72bc2a989ecd3db9e3c2a53264 100644 (file)
@@ -284,6 +284,11 @@ void AsmPrinter::emitGlobalConstant(const Constant *CV) {
     O << Data16bitsDirective;
     break;
   case Type::PointerTyID:
+    if (TD.getPointerSize() == 8) {
+      O << Data64bitsDirective;
+      break;
+    }
+    //Fall through for pointer size == int size
   case Type::UIntTyID: case Type::IntTyID:
     O << Data32bitsDirective;
     break;