| 55 | |
| 56 | /// Returns the string representation of a llvm::Value* or llvm::Type* |
| 57 | template <typename T> static std::string Print(T* value_or_type) { |
| 58 | std::string str; |
| 59 | llvm::raw_string_ostream stream(str); |
| 60 | value_or_type->print(stream); |
| 61 | return str; |
| 62 | } |
| 63 | |
| 64 | /// Return the byte size of the given PrimitiveType. |
| 65 | static int64_t GetTypeSize(const PrimitiveType type) { |