summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorRichard Trieu <rtrieu@google.com>2014-06-21 02:43:02 +0000
committerRichard Trieu <rtrieu@google.com>2014-06-21 02:43:02 +0000
commitc1485223a688abe8a86e27529e86bd0fa885ceeb (patch)
tree01e75c881a2bfd892b2d1c06ab1bd8ff014db96c /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent9eaae3d8f67a7f85c58888b2074854f63266bfac (diff)
downloadbcm5719-llvm-c1485223a688abe8a86e27529e86bd0fa885ceeb.tar.gz
bcm5719-llvm-c1485223a688abe8a86e27529e86bd0fa885ceeb.zip
Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found. llvm-svn: 211430
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
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 <null> Type";
AP.OutStreamer.GetCommentOS() << ' ' << StrVal << '\n';
}
OpenPOWER on IntegriCloud