Find longs by type, not by their primitive size being 64. Patch by Nate Begeman.
authorMisha Brukman <brukman+llvm@gmail.com>
Wed, 28 Jul 2004 19:12:24 +0000 (19:12 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Wed, 28 Jul 2004 19:12:24 +0000 (19:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15304 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPC32AsmPrinter.cpp
lib/Target/PowerPC/PPCAsmPrinter.cpp
lib/Target/PowerPC/PowerPCAsmPrinter.cpp

index 891e3e818200a1aeefc752dce14e3348364aabda..032bf598e923e8542fc842e80305472e51e5d43e 100644 (file)
@@ -294,7 +294,7 @@ void Printer::emitGlobalConstant(const Constant *CV) {
       return;
     }
     }
-  } else if (CV->getType()->getPrimitiveSize() == 64) {
+  } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) {
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
       union DU {                            // Abide by C TBAA rules
         int64_t UVal;
index 891e3e818200a1aeefc752dce14e3348364aabda..032bf598e923e8542fc842e80305472e51e5d43e 100644 (file)
@@ -294,7 +294,7 @@ void Printer::emitGlobalConstant(const Constant *CV) {
       return;
     }
     }
-  } else if (CV->getType()->getPrimitiveSize() == 64) {
+  } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) {
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
       union DU {                            // Abide by C TBAA rules
         int64_t UVal;
index 891e3e818200a1aeefc752dce14e3348364aabda..032bf598e923e8542fc842e80305472e51e5d43e 100644 (file)
@@ -294,7 +294,7 @@ void Printer::emitGlobalConstant(const Constant *CV) {
       return;
     }
     }
-  } else if (CV->getType()->getPrimitiveSize() == 64) {
+  } else if (CV->getType() == Type::ULongTy || CV->getType() == Type::LongTy) {
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
       union DU {                            // Abide by C TBAA rules
         int64_t UVal;