Find longs by type, not by their primitive size being 64. Patch by Nate Begeman.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-07-28 19:12:24 +00:00
parent 8b29776d68
commit f63bc199c6
3 changed files with 3 additions and 3 deletions

View 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;

View 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;

View 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;