have LLVM print type strings for us
Example:
void ({ i64, %tydesc*, i8*, i8*, i8 }*, i64*, %"struct.std::fmt::Formatter[#1]"*)*
Before, we would print 20 levels deep due to recursion in the type
definition.
This commit is contained in:
@@ -803,3 +803,10 @@ extern "C" void LLVMDICompositeTypeSetTypeArray(
|
||||
{
|
||||
unwrapDI<DICompositeType>(CompositeType).setTypeArray(unwrapDI<DIArray>(TypeArray));
|
||||
}
|
||||
|
||||
extern "C" char *LLVMTypeToString(LLVMTypeRef Type) {
|
||||
std::string s;
|
||||
llvm::raw_string_ostream os(s);
|
||||
unwrap<llvm::Type>(Type)->print(os);
|
||||
return strdup(os.str().data());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user