| 66 | // Dump the given LLVM entity to a string. This works for Types and Values. |
| 67 | template <typename T> |
| 68 | string DumpToString(const T& entity) { |
| 69 | std::string buffer_string; |
| 70 | llvm::raw_string_ostream ostream(buffer_string); |
| 71 | entity.print(ostream); |
| 72 | ostream.flush(); |
| 73 | return buffer_string; |
| 74 | } |
| 75 | |
| 76 | // Dump the given LLVM module to a string. This requires a function distinct |
| 77 | // from DumpToString because the signatures of the print() methods for Values |
no test coverage detected