diff options
author | Egor Zhdan <e_zhdan@apple.com> | 2024-04-26 19:30:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-26 19:30:08 +0100 |
commit | b2098db2485331e01503e1452a7a60cd8c031a3f (patch) | |
tree | 696e57c487684031f900918bd79e949c72445002 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | |
parent | b27f86b40b20942c0e809128214b43d6edde365a (diff) | |
download | llvm-b2098db2485331e01503e1452a7a60cd8c031a3f.zip llvm-b2098db2485331e01503e1452a7a60cd8c031a3f.tar.gz llvm-b2098db2485331e01503e1452a7a60cd8c031a3f.tar.bz2 |
[APINotes] Allow annotating a C++ type as non-copyable in Swift
Certain C++ types, such as `std::chrono::tzdb` in libstdc++, are
non-copyable, but don't explicitly delete their copy constructor.
Instead, they trigger template instantiation errors when trying to call
their implicit copy constructor. The Swift compiler inserts implicit
copies of value types in some cases, which trigger compiler errors for
such types.
This adds a Clang API Notes attribute that allows annotating C++ types
as non-copyable in Swift. This lets the Swift compiler know that it
should not try to instantiate the implicit copy constructor for a C++
struct.
rdar://127049438
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions