aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BranchFolding.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2022-03-01 20:08:01 -0800
committerVolodymyr Sapsai <vsapsai@apple.com>2022-04-27 15:52:59 -0700
commitd32c685e1012785c0d2824214740f973d30e1daa (patch)
tree4924753470641c893ca19214f2887cb6ad9348b0 /llvm/lib/CodeGen/BranchFolding.cpp
parent717209763e17c10aaddce9db3faac4ecbf1afd29 (diff)
downloadllvm-d32c685e1012785c0d2824214740f973d30e1daa.zip
llvm-d32c685e1012785c0d2824214740f973d30e1daa.tar.gz
llvm-d32c685e1012785c0d2824214740f973d30e1daa.tar.bz2
[modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.
Emitting metadata for the same ivar multiple times can lead to miscompilations. Objective-C runtime adds offsets to calculate ivar position in memory and presence of duplicate offsets causes wrong final position thus overwriting unrelated memory. Such a situation is impossible with modules disabled as clang diagnoses ivar redeclarations during sema checks after parsing (`Sema::ActOnFields`). Fix the case with modules enabled by checking during deserialization if ivar is already declared. We also support a use case where the same category ends up in multiple modules. We don't want to treat this case as ivar redeclaration and instead merge corresponding ivars. rdar://83468070 Differential Revision: https://reviews.llvm.org/D121177
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
0 files changed, 0 insertions, 0 deletions