From b52ee2de130561c90bd6f2cf771673998a99b4e4 Mon Sep 17 00:00:00 2001 From: Frits van Bommel Date: Sun, 17 May 2009 11:06:14 +0200 Subject: [PATCH] Use %La to hex-format a real instead of pretending it's an integer. --- gen/toir.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index 10dff631..2a5ed2ce 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -11,7 +11,6 @@ #include #include "gen/llvm.h" -#include "llvm/Support/DataTypes.h" #include "attrib.h" #include "init.h" @@ -314,8 +313,7 @@ DValue* RealExp::toElem(IRState* p) LLConstant* RealExp::toConstElem(IRState* p) { - Logger::print("RealExp::toConstElem: %s @ %s | %LX\n", toChars(), type->toChars(), - UINT64_C(0xFFFFFFFFFF) & *(long long unsigned*)&value); + Logger::print("RealExp::toConstElem: %s @ %s | %La\n", toChars(), type->toChars(), value); LOG_SCOPE; Type* t = type->toBasetype(); return DtoConstFP(t, value);