https://github.com/ojhunt closed
https://github.com/llvm/llvm-project/pull/143796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ojhunt wrote:
Closing this PR because there's a lot of noise in it that is just completely
reverted/gone at this point.
https://github.com/llvm/llvm-project/pull/143796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const
CXXRecordDecl *RD) const {
}
void ASTContext::setRelocationInfoForCXXRecord(
-const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) {
+const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -10615,7 +10615,7 @@ void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl
&RD) {
}
}
- if (IsCXXTriviallyRelocatableType(RD))
+ if (CheckCXX2CRelocatableAndReplaceable(&RD).IsRelocatable)
ojhunt wrote:
I think I did restore it for QualType an
@@ -621,17 +621,24 @@ class ASTContext : public RefCountedBase {
public:
struct CXXRecordDeclRelocationInfo {
+static CXXRecordDeclRelocationInfo NonRelocatable() {
+ return {false, false};
+}
+
unsigned IsRelocatable;
unsigned IsReplaceable;
-
@@ -621,17 +621,24 @@ class ASTContext : public RefCountedBase {
public:
struct CXXRecordDeclRelocationInfo {
+static CXXRecordDeclRelocationInfo NonRelocatable() {
+ return {false, false};
+}
+
unsigned IsRelocatable;
unsigned IsReplaceable;
-
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const
CXXRecordDecl *RD) const {
}
void ASTContext::setRelocationInfoForCXXRecord(
-const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) {
+const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn
@@ -292,77 +294,129 @@ Sema::CheckCXX2CRelocatableAndReplaceable(const
CXXRecordDecl *D) {
return HasSuitableSMP();
// is a union with no user-declared special member functions, or
-if (IsUnion())
+if (IsTrivialUnion())
return HasSuitableSMP();
@@ -1698,13 +1698,47 @@ ASTContext::getRelocationInfoForCXXRecord(const
CXXRecordDecl *RD) const {
}
void ASTContext::setRelocationInfoForCXXRecord(
-const CXXRecordDecl *RD, CXXRecordDeclRelocationInfo Info) {
+const CXXRecordDecl *RD, const CXXRecordDeclRelocationIn
@@ -10615,7 +10615,7 @@ void Sema::checkIllFormedTrivialABIStruct(CXXRecordDecl
&RD) {
}
}
- if (IsCXXTriviallyRelocatableType(RD))
+ if (CheckCXX2CRelocatableAndReplaceable(&RD).IsRelocatable)
cor3ntin wrote:
I think we should keep that interface
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp --
clang/test/SemaCXX/trivially-relocatable-ptrauth.cp
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Oliver Hunt (ojhunt)
Changes
This reworks the way we compute relocatability and replaceability of types. We
do this by having a single interface the provides a full `TypeRelocationInfo`
for a QualType. This simplifies the reasoning for al
https://github.com/ojhunt created
https://github.com/llvm/llvm-project/pull/143796
This reworks the way we compute relocatability and replaceability of types. We
do this by having a single interface the provides a full `TypeRelocationInfo`
for a QualType. This simplifies the reasoning for all
16 matches
Mail list logo