aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Basic/SourceManagerTest.cpp
diff options
context:
space:
mode:
authorEli Friedman <efriedma@quicinc.com>2020-04-03 21:56:20 -0700
committerEli Friedman <efriedma@quicinc.com>2020-05-14 13:19:21 -0700
commitaccc6b55450510577f9cfa0b434c97e45ab5d6c6 (patch)
treeddfe53e6892e7ae993ae2364240316c33e834a56 /clang/unittests/Basic/SourceManagerTest.cpp
parent2b7fe0863ac3c076797404f90b49cee696af0564 (diff)
downloadllvm-accc6b55450510577f9cfa0b434c97e45ab5d6c6.zip
llvm-accc6b55450510577f9cfa0b434c97e45ab5d6c6.tar.gz
llvm-accc6b55450510577f9cfa0b434c97e45ab5d6c6.tar.bz2
LoadInst should store Align, not MaybeAlign.
The fact that loads and stores can have the alignment missing is a constant source of confusion: code that usually works can break down in rare cases. So fix the LoadInst API so the alignment is never missing. To reduce the number of changes required to make this work, IRBuilder and certain LoadInst constructors will grab the module's datalayout and compute the alignment automatically. This is the same alignment instcombine would eventually apply anyway; we're just doing it earlier. There's a minor risk that the way we're retrieving the datalayout could break out-of-tree code, but I don't think that's likely. This is the last in a series of patches, so most of the necessary changes have already been merged. Differential Revision: https://reviews.llvm.org/D77454
Diffstat (limited to 'clang/unittests/Basic/SourceManagerTest.cpp')
0 files changed, 0 insertions, 0 deletions