mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211430 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user