Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clang/lib/CIR/CodeGen/EHScopeStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class EHScopeStack {
///
/// Cleanup implementations should generally be declared in an
/// anonymous namespace.
class Cleanup {
class LLVM_MOVABLE_POLYMORPHIC_TYPE Cleanup {
// Anchor the construction vtable.
virtual void anchor();

Expand Down
2 changes: 1 addition & 1 deletion clang/lib/CodeGen/EHScopeStack.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class EHScopeStack {
///
/// Cleanup implementations should generally be declared in an
/// anonymous namespace.
class alignas(uint64_t) Cleanup {
class LLVM_MOVABLE_POLYMORPHIC_TYPE alignas(uint64_t) Cleanup {
// Anchor the construction vtable.
virtual void anchor();

Expand Down
9 changes: 9 additions & 0 deletions llvm/include/llvm/Support/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,15 @@ void AnnotateIgnoreWritesEnd(const char *file, int line);
#define LLVM_PREFERRED_TYPE(T)
#endif

#if LLVM_HAS_CPP_ATTRIBUTE(clang::ptrauth_vtable_pointer) && \
(defined(__PTRAUTH__) || __has_feature(ptrauth_calls))
#define LLVM_MOVABLE_POLYMORPHIC_TYPE \
[[clang::ptrauth_vtable_pointer(default_key, no_address_discrimination, \
default_extra_discrimination)]]
#else
#define LLVM_MOVABLE_POLYMORPHIC_TYPE
#endif

/// \macro LLVM_VIRTUAL_ANCHOR_FUNCTION
/// This macro is used to adhere to LLVM's policy that each class with a vtable
/// must have at least one out-of-line virtual function. This macro allows us
Expand Down
Loading