compiler construction - Pretty printing type of values in llvm pass -
i trying print type , name of values used inside loop follows:
(value->gettype())->print(cout); errs() << " type: " << cout.str() << " "; errs() << " name: " << (value->getname()) << "\n";
i following output:
type: i32* name: sum type: [25 x %struct.book]* name: books
is possible pretty print type in way used in program? instance, as:
type: int name: sum type: struct book name: books
you should write own function. example, see original function typeprinting::print
.
Comments
Post a Comment