diff options
| author | Andrew Savonichev <andrew.savonichev@gmail.com> | 2025-10-24 09:43:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-24 09:43:10 +0900 |
| commit | 6ed814a823258fa357c25bd71e76eb688fbbff79 (patch) | |
| tree | 6c6f3237331c1e1087aa0eebd9d999147d7ae433 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
| parent | 169626f11ab19a0b33fba2ca84cf4d9ec2b76fb1 (diff) | |
| download | llvm-6ed814a823258fa357c25bd71e76eb688fbbff79.zip llvm-6ed814a823258fa357c25bd71e76eb688fbbff79.tar.gz llvm-6ed814a823258fa357c25bd71e76eb688fbbff79.tar.bz2 | |
[IR] Fix Module::setModuleFlag for uniqued metadata (#164580)
`Module::setModuleFlag` is supposed to change a single module. However,
when an `MDNode` has the same value in more than one module in the same
`LLVMContext`, such `MDNode` is shared (uniqued) across all of them.
Therefore `MDNode::replaceOperandWith` changes all modules that share
the same `MDNode`.
This used to cause problems for #86212, where a module is marked as
"upgraded" via a module flag. When this flag is shared across multiple
modules, all of them are marked, yet some may not have been processed at
all.
After the patch we now construct a new `MDNode` and replace the old one.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
