aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2023-06-12 13:50:50 -0700
committerReid Kleckner <rnk@google.com>2023-06-13 12:54:23 -0700
commit651e5ae62d29fdb07eb85f75ab7e686b98479f3a (patch)
treeb0943ea0e9cd07a92bc327b54a620e794d0c5179 /flang/lib/Frontend/CompilerInvocation.cpp
parenta5cd198181f937417c988e82f50461adb29aef76 (diff)
downloadllvm-651e5ae62d29fdb07eb85f75ab7e686b98479f3a.zip
llvm-651e5ae62d29fdb07eb85f75ab7e686b98479f3a.tar.gz
llvm-651e5ae62d29fdb07eb85f75ab7e686b98479f3a.tar.bz2
[MS] Fix passing aligned records by value in some cases
It's not exactly clear what the meaning of TypeInfo::AlignRequirement is, so go directly to the ASTRecordLayout for records and check the required alignment there. Compare that number with the stack alignment value of 4. This fixes cases when the alignment attribute does not appear directly on the record [1], or when the attribute on the record is underaligned [2]. [1]: `struct Foo { int __declspec(align(16)) x; };` [2]: `struct __declspec(align(1)) Bar { int x; };` Fixes https://llvm.org/pr63257 Differential Revision: https://reviews.llvm.org/D152752
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions