aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
-rw-r--r--lib/Target/CBackend/Writer.cpp4
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 196281f6e8..1922e6fd26 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<ConstantPointerNull>(CPV)) {
- Out << "((";
- printType(CPV->getType(), "");
- Out << ")NULL)";
+ Out << "(NULL)";
break;
} else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) {
writeOperand(CPR->getValue());
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 196281f6e8..1922e6fd26 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<ConstantPointerNull>(CPV)) {
- Out << "((";
- printType(CPV->getType(), "");
- Out << ")NULL)";
+ Out << "(NULL)";
break;
} else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(CPV)) {
writeOperand(CPR->getValue());