From c1485223a688abe8a86e27529e86bd0fa885ceeb Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Sat, 21 Jun 2014 02:43:02 +0000 Subject: Add back functionality removed in r210497. Instead of asserting, output a message stating that a null pointer was found. llvm-svn: 211430 --- llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index d30588e5d4f..799ee92d3ad 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1866,8 +1866,10 @@ static void emitGlobalConstantFP(const ConstantFP *CFP, AsmPrinter &AP) { SmallString<8> StrVal; CFP->getValueAPF().toString(StrVal); - assert(CFP->getType() != nullptr && "Expecting non-null Type"); - CFP->getType()->print(AP.OutStreamer.GetCommentOS()); + if (CFP->getType()) + CFP->getType()->print(AP.OutStreamer.GetCommentOS()); + else + AP.OutStreamer.GetCommentOS() << "Printing Type"; AP.OutStreamer.GetCommentOS() << ' ' << StrVal << '\n'; } -- cgit v1.2.3