diff options
Diffstat (limited to 'lib/IR/Core.cpp')
-rw-r--r-- | lib/IR/Core.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index aa373f602a..f24704c61c 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -281,6 +281,7 @@ char *LLVMPrintTypeToString(LLVMTypeRef Ty) { std::string buf; raw_string_ostream os(buf); + assert(unwrap(Ty) != nullptr && "Expecting non-null Type"); unwrap(Ty)->print(os); os.flush(); @@ -531,6 +532,7 @@ char* LLVMPrintValueToString(LLVMValueRef Val) { std::string buf; raw_string_ostream os(buf); + assert(unwrap(Val) != nullptr && "Expecting non-null Value"); unwrap(Val)->print(os); os.flush(); |