From: Nick Hildenbrandt Date: Mon, 28 Oct 2002 19:54:06 +0000 (+0000) Subject: Casting NULL can cause problems so lets just not cast NULL to anything. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0fca36d149f528b9c14b9ec83fd4e1b53535285;p=oota-llvm.git 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 --- diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 196281f6e85..1922e6fd265 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -426,9 +426,7 @@ void CWriter::printConstant(Constant *CPV) { case Type::PointerTyID: if (isa(CPV)) { - Out << "(("; - printType(CPV->getType(), ""); - Out << ")NULL)"; + Out << "(NULL)"; break; } else if (ConstantPointerRef *CPR = dyn_cast(CPV)) { writeOperand(CPR->getValue()); diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 196281f6e85..1922e6fd265 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -426,9 +426,7 @@ void CWriter::printConstant(Constant *CPV) { case Type::PointerTyID: if (isa(CPV)) { - Out << "(("; - printType(CPV->getType(), ""); - Out << ")NULL)"; + Out << "(NULL)"; break; } else if (ConstantPointerRef *CPR = dyn_cast(CPV)) { writeOperand(CPR->getValue());