[flang] Use fundamental types in overloadings of Unparse.

Different systems map std::size_t, string::size_type, etc. to different
fundamental types. To ensure they are all covered, make the overloadings
of Unparse for integer types use only fundamental types.

This fixes compilations problems on Darwin and *BSD systems.

Original-commit: flang-compiler/f18@5576ed49a2
Reviewed-on: https://github.com/flang-compiler/f18/pull/205
This commit is contained in:
Tim Keith 2018-10-10 07:24:27 -07:00
parent 56508e973c
commit 03435d981d
1 changed files with 5 additions and 2 deletions

View File

@ -62,8 +62,11 @@ public:
// Emit simple types as-is.
void Unparse(const std::string &x) { Put(x); }
void Unparse(int x) { Put(std::to_string(x)); }
void Unparse(std::uint64_t x) { Put(std::to_string(x)); }
void Unparse(std::int64_t x) { Put(std::to_string(x)); }
void Unparse(unsigned int x) { Put(std::to_string(x)); }
void Unparse(long x) { Put(std::to_string(x)); }
void Unparse(unsigned long x) { Put(std::to_string(x)); }
void Unparse(long long x) { Put(std::to_string(x)); }
void Unparse(unsigned long long x) { Put(std::to_string(x)); }
void Unparse(char x) { Put(x); }
// Statement labels and ends of lines