Index: clang/lib/Sema/SemaDeclAttr.cpp =================================================================== --- clang/lib/Sema/SemaDeclAttr.cpp +++ clang/lib/Sema/SemaDeclAttr.cpp @@ -3006,13 +3006,6 @@ if (!S.checkSectionName(LiteralLoc, Str)) return; - // If the target wants to validate the section specifier, make it happen. - if (llvm::Error E = S.Context.getTargetInfo().isValidSectionSpecifier(Str)) { - S.Diag(LiteralLoc, diag::err_attribute_section_invalid_for_target) - << toString(std::move(E)); - return; - } - SectionAttr *NewAttr = S.mergeSectionAttr(D, AL, Str); if (NewAttr) { D->addAttr(NewAttr);