diff options
author | Richard Trieu <rtrieu@google.com> | 2014-06-21 02:43:02 +0000 |
---|---|---|
committer | Richard Trieu <rtrieu@google.com> | 2014-06-21 02:43:02 +0000 |
commit | c1485223a688abe8a86e27529e86bd0fa885ceeb (patch) | |
tree | 01e75c881a2bfd892b2d1c06ab1bd8ff014db96c /llvm/lib/Transforms/Instrumentation/DebugIR.cpp | |
parent | 9eaae3d8f67a7f85c58888b2074854f63266bfac (diff) | |
download | bcm5719-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/Transforms/Instrumentation/DebugIR.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/DebugIR.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp index 1bfef574ddb..f2f1738808b 100644 --- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp +++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp @@ -352,10 +352,12 @@ private: } std::string getTypeName(Type *T) { - assert(T != nullptr && "Expecting non-null Type"); std::string TypeName; raw_string_ostream TypeStream(TypeName); - T->print(TypeStream); + if (T) + T->print(TypeStream); + else + TypeStream << "Printing <null> Type"; TypeStream.flush(); return TypeName; } |