projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db59c17
)
Add a better comment to explain what is going on.
author
Chris Lattner
<sabre@nondot.org>
Sun, 7 Apr 2002 08:31:26 +0000
(08:31 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 7 Apr 2002 08:31:26 +0000
(08:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2139
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/Lexer.l
patch
|
blob
|
history
diff --git
a/lib/AsmParser/Lexer.l
b/lib/AsmParser/Lexer.l
index a5cb4eff2658dbab93caadd7fc94a36aeb2048f5..9cfe9fd78e5ad5f0cc48bed66566ade2de99047e 100644
(file)
--- a/
lib/AsmParser/Lexer.l
+++ b/
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
}