diff options
author | Ben Dunbobbin <Ben.Dunbobbin@sony.com> | 2020-10-09 13:22:46 +0100 |
---|---|---|
committer | Ben Dunbobbin <Ben.Dunbobbin@sony.com> | 2020-10-09 13:22:46 +0100 |
commit | a9f1bb92bfb1efc005b53bf9ea18ad5e902386fc (patch) | |
tree | 12d6d151d2624e7ef174697fd6a372701862f75f /clang/lib | |
parent | 4eb627ed96e3f2f9f24aec8a0654ce5204874bb8 (diff) | |
download | llvm-a9f1bb92bfb1efc005b53bf9ea18ad5e902386fc.zip llvm-a9f1bb92bfb1efc005b53bf9ea18ad5e902386fc.tar.gz llvm-a9f1bb92bfb1efc005b53bf9ea18ad5e902386fc.tar.bz2 |
Revert "first upstream review"
Pushed by accident :(
This reverts commit 4eb627ed96e3f2f9f24aec8a0654ce5204874bb8.
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 6 |
3 files changed, 6 insertions, 13 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 9a6682e..c92d906 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -6497,9 +6497,7 @@ static void checkDLLAttributeRedeclaration(Sema &S, NamedDecl *OldDecl, // special MSVC extension: in the last case, the declaration is treated as if // it were marked dllexport. bool IsInline = false, IsStaticDataMember = false, IsQualifiedFriend = false; - bool IsMicrosoft = - S.Context.getTargetInfo().getCXXABI().isMicrosoft() || - S.Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment(); + bool IsMicrosoft = S.Context.getTargetInfo().getCXXABI().isMicrosoft(); if (const auto *VD = dyn_cast<VarDecl>(NewDecl)) { // Ignore static data because out-of-line definitions are diagnosed // separately. diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index 0ccfb15..c07e5f7 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -6731,16 +6731,14 @@ DLLExportAttr *Sema::mergeDLLExportAttr(Decl *D, static void handleDLLAttr(Sema &S, Decl *D, const ParsedAttr &A) { if (isa<ClassTemplatePartialSpecializationDecl>(D) && - (S.Context.getTargetInfo().getCXXABI().isMicrosoft() || - S.Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment())) { + S.Context.getTargetInfo().getCXXABI().isMicrosoft()) { S.Diag(A.getRange().getBegin(), diag::warn_attribute_ignored) << A; return; } if (const auto *FD = dyn_cast<FunctionDecl>(D)) { if (FD->isInlined() && A.getKind() == ParsedAttr::AT_DLLImport && - !(S.Context.getTargetInfo().getCXXABI().isMicrosoft() || - S.Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment())) { + !S.Context.getTargetInfo().getCXXABI().isMicrosoft()) { // MinGW doesn't allow dllimport on inline functions. S.Diag(A.getRange().getBegin(), diag::warn_attribute_ignored_on_inline) << A; @@ -6749,8 +6747,7 @@ static void handleDLLAttr(Sema &S, Decl *D, const ParsedAttr &A) { } if (const auto *MD = dyn_cast<CXXMethodDecl>(D)) { - if ((S.Context.getTargetInfo().getCXXABI().isMicrosoft() || - S.Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment()) && + if (S.Context.getTargetInfo().getCXXABI().isMicrosoft() && MD->getParent()->isLambda()) { S.Diag(A.getRange().getBegin(), diag::err_attribute_dll_lambda) << A; return; diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 138faa1..1275fc0c 100644 --- a/clang/lib/Sema/SemaDeclCXX.cpp +++ b/clang/lib/Sema/SemaDeclCXX.cpp @@ -6060,8 +6060,7 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { Attr *ClassAttr = getDLLAttr(Class); // MSVC inherits DLL attributes to partial class template specializations. - if ((Context.getTargetInfo().getCXXABI().isMicrosoft() || - Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment()) && !ClassAttr) { + if (Context.getTargetInfo().getCXXABI().isMicrosoft() && !ClassAttr) { if (auto *Spec = dyn_cast<ClassTemplatePartialSpecializationDecl>(Class)) { if (Attr *TemplateAttr = getDLLAttr(Spec->getSpecializedTemplate()->getTemplatedDecl())) { @@ -6081,8 +6080,7 @@ void Sema::checkClassLevelDLLAttribute(CXXRecordDecl *Class) { return; } - if ((Context.getTargetInfo().getCXXABI().isMicrosoft() || - Context.getTargetInfo().getTriple().isWindowsItaniumEnvironment()) && + if (Context.getTargetInfo().getCXXABI().isMicrosoft() && !ClassAttr->isInherited()) { // Diagnose dll attributes on members of class with dll attribute. for (Decl *Member : Class->decls()) { |