mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Addresses part of issue raised in #7159 by implementing float.negate builtin for FloatLiteralValues The following code now compiles: ``` let a: f64 = -1.0; ``` To achieve this I switch the mantissa from being unsigned to signed. Lexed literals within source file will still always be unsigned, however it is now possible to create negative FloatLiteralValue constants. Main non-local changes this causes is: - All llvm::APInt parsing / printing calls flipped isSigned param - Zero extension replaced with sign extension - getActiveBits() replaced with getSignificantBits() for min bit width calculation