summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-07 08:31:26 +0000
committerChris Lattner <sabre@nondot.org>2002-04-07 08:31:26 +0000
commitb99f479f71cdc322e5ea4cbd0f8a1d090bdd395b (patch)
tree2ef0cb40a7483f1c21e68b742060e3a3932cb028 /llvm/lib/AsmParser
parent9a432f739a9359cb1cbf97064cef6f8a805e84d8 (diff)
downloadbcm5719-llvm-b99f479f71cdc322e5ea4cbd0f8a1d090bdd395b.tar.gz
bcm5719-llvm-b99f479f71cdc322e5ea4cbd0f8a1d090bdd395b.zip
Add a better comment to explain what is going on.
llvm-svn: 2139
Diffstat (limited to 'llvm/lib/AsmParser')
-rw-r--r--llvm/lib/AsmParser/Lexer.l5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/Lexer.l b/llvm/lib/AsmParser/Lexer.l
index a5cb4eff265..9cfe9fd78e5 100644
--- a/llvm/lib/AsmParser/Lexer.l
+++ b/llvm/lib/AsmParser/Lexer.l
@@ -70,7 +70,10 @@ static double HexToFP(const char *Buffer) {
assert(sizeof(double) == sizeof(Result) &&
"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
}
OpenPOWER on IntegriCloud