1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add a better comment to explain what is going on.

llvm-svn: 2139
This commit is contained in:
Chris Lattner 2002-04-07 08:31:26 +00:00
parent a19d7e1400
commit 9dfa62172d

View File

@ -70,7 +70,10 @@ static double HexToFP(const char *Buffer) {
assert(sizeof(double) == sizeof(Result) && assert(sizeof(double) == sizeof(Result) &&
"Data sizes incompatible on this target!"); "Data sizes incompatible on this target!");
void *ProxyPointer = &Result; // Break TBAA correctly // Behave nicely in the face of C TBAA rules... see:
// http://www.nullstone.com/htmls/category/aliastyp.htm
//
char *ProxyPointer = (char*)&Result;
return *(double*)ProxyPointer; // Cast Hex constant to double return *(double*)ProxyPointer; // Cast Hex constant to double
} }