HomePhabricator

[flang][msvc] Avoid a reinterpret_cast

Authored by klausler on Oct 14 2020, 3:57 PM.

Description

[flang][msvc] Avoid a reinterpret_cast

The call to the binary->decimal formatter in real.cpp was cheating
by using a reinterpret_cast<> to extract its binary value.
Use a more principled and portable approach by extending the
API of evaluate::Integer<> to include ToUInt<>()/ToSInt<>()
member function templates that do the "right" thing. Retain
ToUInt64()/ToSInt64() for compatibility.

Differential revision: https://reviews.llvm.org/D89435

Details

Committed
klauslerOct 15 2020, 10:38 AM
Differential Revision
D89435: [flang][msvc] Avoid a reinterpret_cast
Parents
rGcf6fd404f339: [mlir][Linalg] NFC - Rename test files s/_/-/g
Branches
Unknown
Tags
Unknown