systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
APIntUtils.h
Go to the documentation of this file.
1#ifndef _APINT_UTILS_H_
2#define _APINT_UTILS_H_
3
4#include <string>
5
6#include "llvm/ADT/APInt.h"
7#include "llvm/ADT/SmallString.h"
8
9namespace systemc_clang {
10namespace utils {
11namespace apint {
12
13template <typename T>
14std::string toString(const T &i) {
15 llvm::SmallString<10> small_str;
16 i.toString(small_str, 10, true);
17
18 return small_str.str().str();
19}
20
21}; // namespace apint
22}; // namespace utils
23}; // namespace systemc_clang
24#endif
std::string toString(const T &i)
Definition APIntUtils.h:14