From f0fca36d149f528b9c14b9ec83fd4e1b53535285 Mon Sep 17 00:00:00 2001 From: Nick Hildenbrandt Date: Mon, 28 Oct 2002 19:54:06 +0000 Subject: [PATCH] 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 --- lib/Target/CBackend/CBackend.cpp | 4 +--- lib/Target/CBackend/Writer.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) 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());