[PATH] Use getPreferredAlignment instead for getABIAlignment when checking global variables in lint

Julien Lerouge jlerouge at apple.com
Fri May 30 17:47:53 PDT 2014


Hello,

The attached patch changes Lint.cpp to use the preferred alignment instead of the ABI alignment for global variables defined in the current module that don’t have any explicit alignment set.

computeKnownBits() in ValueTracking.cpp is doing the same thing, so this patch is just fixing an inconsistency that is causing lint warnings when it really shouldn’t.

http://reviews.llvm.org/D3975

lib/Analysis/Lint.cpp              |  2 +-        
test/Analysis/Lint/global-align.ll | 10 ++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3975.diff
Type: application/octet-stream
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140530/dfda380d/attachment.obj>


More information about the llvm-commits mailing list