Casting NULL can cause problems so lets just not cast NULL to anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4349 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Hildenbrandt 2002-10-28 19:54:06 +00:00
parent 2f305989b3
commit f0fca36d14
2 changed files with 2 additions and 6 deletions

View File

@ -426,9 +426,7 @@ void CWriter::printConstant(Constant *CPV) {
case Type::PointerTyID: case Type::PointerTyID:
if (isa<ConstantPointerNull>(CPV)) { if (isa<ConstantPointerNull>(CPV)) {
Out << "(("; Out << "(NULL)";
printType(CPV->getType(), "");
Out << ")NULL)";
break; break;
} else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) { } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) {
writeOperand(CPR->getValue()); writeOperand(CPR->getValue());

View File

@ -426,9 +426,7 @@ void CWriter::printConstant(Constant *CPV) {
case Type::PointerTyID: case Type::PointerTyID:
if (isa<ConstantPointerNull>(CPV)) { if (isa<ConstantPointerNull>(CPV)) {
Out << "(("; Out << "(NULL)";
printType(CPV->getType(), "");
Out << ")NULL)";
break; break;
} else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) { } else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) {
writeOperand(CPR->getValue()); writeOperand(CPR->getValue());