diff options
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; } |