[llvm-commits] [PATCH] Fix type size calculation in CreateMalloc(), getMallocArraySize(), and isArrayMalloc()
Victor Hernandez
vhernandez at apple.com
Fri Sep 11 09:41:31 PDT 2009
Malloc call codegen was using ConstantExpr::getSizeOf() to determine
the size of a type, when it should have been using Type->
getPrimitiveSizeInBits(). Fixed that. isArrayMalloc()now correctly
identifies array mallocs.
I also reorganized the InsertBefore vs. InsertAtEnd code in
createMalloc() for clarity.
Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090911/e61664ad/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FixTypeSize.diff
Type: application/octet-stream
Size: 5681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090911/e61664ad/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090911/e61664ad/attachment-0001.html>
More information about the llvm-commits
mailing list