Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package llvm18 for openSUSE:Factory checked in at 2024-03-25 21:06:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/llvm18 (Old) and /work/SRC/openSUSE:Factory/.llvm18.new.1905 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "llvm18" Mon Mar 25 21:06:08 2024 rev:2 rq:1161128 version:18.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/llvm18/llvm18.changes 2024-03-15 20:28:44.614473624 +0100 +++ /work/SRC/openSUSE:Factory/.llvm18.new.1905/llvm18.changes 2024-03-25 21:06:31.941511044 +0100 @@ -1,0 +2,11 @@ +Sat Mar 23 22:47:43 UTC 2024 - Aaron Puchert <[email protected]> + +- Update to version 18.1.2. + * This release contains bug-fixes for the LLVM 18.1.0 release. + This release is API and ABI compatible with 18.1.0. +- Rebase patches: + * llvm-do-not-install-static-libraries.patch + * llvm-normally-versioned-libllvm.patch +- Prefer ld.bfd for now to get THP-compatible section layout. + +------------------------------------------------------------------- Old: ---- clang-18.1.1.src.tar.xz clang-18.1.1.src.tar.xz.sig clang-docs-18.1.1.src.tar.xz clang-tools-extra-18.1.1.src.tar.xz clang-tools-extra-18.1.1.src.tar.xz.sig cmake-18.1.1.src.tar.xz cmake-18.1.1.src.tar.xz.sig compiler-rt-18.1.1.src.tar.xz compiler-rt-18.1.1.src.tar.xz.sig libcxx-18.1.1.src.tar.xz libcxx-18.1.1.src.tar.xz.sig libcxxabi-18.1.1.src.tar.xz libcxxabi-18.1.1.src.tar.xz.sig lld-18.1.1.src.tar.xz lld-18.1.1.src.tar.xz.sig lldb-18.1.1.src.tar.xz lldb-18.1.1.src.tar.xz.sig llvm-18.1.1.src.tar.xz llvm-18.1.1.src.tar.xz.sig llvm-docs-18.1.1.src.tar.xz openmp-18.1.1.src.tar.xz openmp-18.1.1.src.tar.xz.sig polly-18.1.1.src.tar.xz polly-18.1.1.src.tar.xz.sig runtimes-18.1.1.src.tar.xz runtimes-18.1.1.src.tar.xz.sig third-party-18.1.1.src.tar.xz third-party-18.1.1.src.tar.xz.sig New: ---- clang-18.1.2.src.tar.xz clang-18.1.2.src.tar.xz.sig clang-docs-18.1.2.src.tar.xz clang-tools-extra-18.1.2.src.tar.xz clang-tools-extra-18.1.2.src.tar.xz.sig cmake-18.1.2.src.tar.xz cmake-18.1.2.src.tar.xz.sig compiler-rt-18.1.2.src.tar.xz compiler-rt-18.1.2.src.tar.xz.sig libcxx-18.1.2.src.tar.xz libcxx-18.1.2.src.tar.xz.sig libcxxabi-18.1.2.src.tar.xz libcxxabi-18.1.2.src.tar.xz.sig lld-18.1.2.src.tar.xz lld-18.1.2.src.tar.xz.sig lldb-18.1.2.src.tar.xz lldb-18.1.2.src.tar.xz.sig llvm-18.1.2.src.tar.xz llvm-18.1.2.src.tar.xz.sig llvm-docs-18.1.2.src.tar.xz openmp-18.1.2.src.tar.xz openmp-18.1.2.src.tar.xz.sig polly-18.1.2.src.tar.xz polly-18.1.2.src.tar.xz.sig runtimes-18.1.2.src.tar.xz runtimes-18.1.2.src.tar.xz.sig third-party-18.1.2.src.tar.xz third-party-18.1.2.src.tar.xz.sig ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ llvm18.spec ++++++ --- /var/tmp/diff_new_pack.6VvYZd/_old 2024-03-25 21:06:38.293744447 +0100 +++ /var/tmp/diff_new_pack.6VvYZd/_new 2024-03-25 21:06:38.297744594 +0100 @@ -19,7 +19,7 @@ %global _sonum 18 %global _minor %{_sonum}.1 %global _soname %{_minor}%{?_sosuffix} -%global _patch_level 1 +%global _patch_level 2 %global _relver %{_minor}.%{_patch_level} %global _version %_relver%{?_rc:rc%_rc} %global _tagver %_relver%{?_rc:-rc%_rc} @@ -41,7 +41,8 @@ %bcond_with openmp %endif -%ifarch riscv64 s390x +# Prefer ld.bfd for now because it produces a THP-compatible section layout. +%ifnarch %{arm} %bcond_with use_lld %else %bcond_without use_lld ++++++ clang-18.1.1.src.tar.xz -> clang-18.1.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm18/clang-18.1.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm18.new.1905/clang-18.1.2.src.tar.xz differ: char 27, line 1 ++++++ clang-docs-18.1.1.src.tar.xz -> clang-docs-18.1.2.src.tar.xz ++++++ ++++ 3130 lines of diff (skipped) ++++++ clang-tools-extra-18.1.1.src.tar.xz -> clang-tools-extra-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-18.1.1.src/clangd/HeuristicResolver.cpp new/clang-tools-extra-18.1.2.src/clangd/HeuristicResolver.cpp --- old/clang-tools-extra-18.1.1.src/clangd/HeuristicResolver.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/clang-tools-extra-18.1.2.src/clangd/HeuristicResolver.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -16,6 +16,80 @@ namespace clang { namespace clangd { +namespace { + +// Helper class for implementing HeuristicResolver. +// Unlike HeuristicResolver which is a long-lived class, +// a new instance of this class is created for every external +// call into a HeuristicResolver operation. That allows this +// class to store state that's local to such a top-level call, +// particularly "recursion protection sets" that keep track of +// nodes that have already been seen to avoid infinite recursion. +class HeuristicResolverImpl { +public: + HeuristicResolverImpl(ASTContext &Ctx) : Ctx(Ctx) {} + + // These functions match the public interface of HeuristicResolver + // (but aren't const since they may modify the recursion protection sets). + std::vector<const NamedDecl *> + resolveMemberExpr(const CXXDependentScopeMemberExpr *ME); + std::vector<const NamedDecl *> + resolveDeclRefExpr(const DependentScopeDeclRefExpr *RE); + std::vector<const NamedDecl *> resolveTypeOfCallExpr(const CallExpr *CE); + std::vector<const NamedDecl *> resolveCalleeOfCallExpr(const CallExpr *CE); + std::vector<const NamedDecl *> + resolveUsingValueDecl(const UnresolvedUsingValueDecl *UUVD); + std::vector<const NamedDecl *> + resolveDependentNameType(const DependentNameType *DNT); + std::vector<const NamedDecl *> resolveTemplateSpecializationType( + const DependentTemplateSpecializationType *DTST); + const Type *resolveNestedNameSpecifierToType(const NestedNameSpecifier *NNS); + const Type *getPointeeType(const Type *T); + +private: + ASTContext &Ctx; + + // Recursion protection sets + llvm::SmallSet<const DependentNameType *, 4> SeenDependentNameTypes; + + // Given a tag-decl type and a member name, heuristically resolve the + // name to one or more declarations. + // The current heuristic is simply to look up the name in the primary + // template. This is a heuristic because the template could potentially + // have specializations that declare different members. + // Multiple declarations could be returned if the name is overloaded + // (e.g. an overloaded method in the primary template). + // This heuristic will give the desired answer in many cases, e.g. + // for a call to vector<T>::size(). + std::vector<const NamedDecl *> + resolveDependentMember(const Type *T, DeclarationName Name, + llvm::function_ref<bool(const NamedDecl *ND)> Filter); + + // Try to heuristically resolve the type of a possibly-dependent expression + // `E`. + const Type *resolveExprToType(const Expr *E); + std::vector<const NamedDecl *> resolveExprToDecls(const Expr *E); + + // Helper function for HeuristicResolver::resolveDependentMember() + // which takes a possibly-dependent type `T` and heuristically + // resolves it to a CXXRecordDecl in which we can try name lookup. + CXXRecordDecl *resolveTypeToRecordDecl(const Type *T); + + // This is a reimplementation of CXXRecordDecl::lookupDependentName() + // so that the implementation can call into other HeuristicResolver helpers. + // FIXME: Once HeuristicResolver is upstreamed to the clang libraries + // (https://github.com/clangd/clangd/discussions/1662), + // CXXRecordDecl::lookupDepenedentName() can be removed, and its call sites + // can be modified to benefit from the more comprehensive heuristics offered + // by HeuristicResolver instead. + std::vector<const NamedDecl *> + lookupDependentName(CXXRecordDecl *RD, DeclarationName Name, + llvm::function_ref<bool(const NamedDecl *ND)> Filter); + bool findOrdinaryMemberInDependentClasses(const CXXBaseSpecifier *Specifier, + CXXBasePath &Path, + DeclarationName Name); +}; + // Convenience lambdas for use as the 'Filter' parameter of // HeuristicResolver::resolveDependentMember(). const auto NoFilter = [](const NamedDecl *D) { return true; }; @@ -31,8 +105,6 @@ return isa<TemplateDecl>(D); }; -namespace { - const Type *resolveDeclsToType(const std::vector<const NamedDecl *> &Decls, ASTContext &Ctx) { if (Decls.size() != 1) // Names an overload set -- just bail. @@ -46,12 +118,10 @@ return nullptr; } -} // namespace - // Helper function for HeuristicResolver::resolveDependentMember() // which takes a possibly-dependent type `T` and heuristically // resolves it to a CXXRecordDecl in which we can try name lookup. -CXXRecordDecl *HeuristicResolver::resolveTypeToRecordDecl(const Type *T) const { +CXXRecordDecl *HeuristicResolverImpl::resolveTypeToRecordDecl(const Type *T) { assert(T); // Unwrap type sugar such as type aliases. @@ -84,7 +154,7 @@ return TD->getTemplatedDecl(); } -const Type *HeuristicResolver::getPointeeType(const Type *T) const { +const Type *HeuristicResolverImpl::getPointeeType(const Type *T) { if (!T) return nullptr; @@ -117,8 +187,8 @@ return FirstArg.getAsType().getTypePtrOrNull(); } -std::vector<const NamedDecl *> HeuristicResolver::resolveMemberExpr( - const CXXDependentScopeMemberExpr *ME) const { +std::vector<const NamedDecl *> HeuristicResolverImpl::resolveMemberExpr( + const CXXDependentScopeMemberExpr *ME) { // If the expression has a qualifier, try resolving the member inside the // qualifier's type. // Note that we cannot use a NonStaticFilter in either case, for a couple @@ -164,14 +234,14 @@ return resolveDependentMember(BaseType, ME->getMember(), NoFilter); } -std::vector<const NamedDecl *> HeuristicResolver::resolveDeclRefExpr( - const DependentScopeDeclRefExpr *RE) const { +std::vector<const NamedDecl *> +HeuristicResolverImpl::resolveDeclRefExpr(const DependentScopeDeclRefExpr *RE) { return resolveDependentMember(RE->getQualifier()->getAsType(), RE->getDeclName(), StaticFilter); } std::vector<const NamedDecl *> -HeuristicResolver::resolveTypeOfCallExpr(const CallExpr *CE) const { +HeuristicResolverImpl::resolveTypeOfCallExpr(const CallExpr *CE) { const auto *CalleeType = resolveExprToType(CE->getCallee()); if (!CalleeType) return {}; @@ -187,7 +257,7 @@ } std::vector<const NamedDecl *> -HeuristicResolver::resolveCalleeOfCallExpr(const CallExpr *CE) const { +HeuristicResolverImpl::resolveCalleeOfCallExpr(const CallExpr *CE) { if (const auto *ND = dyn_cast_or_null<NamedDecl>(CE->getCalleeDecl())) { return {ND}; } @@ -195,29 +265,31 @@ return resolveExprToDecls(CE->getCallee()); } -std::vector<const NamedDecl *> HeuristicResolver::resolveUsingValueDecl( - const UnresolvedUsingValueDecl *UUVD) const { +std::vector<const NamedDecl *> HeuristicResolverImpl::resolveUsingValueDecl( + const UnresolvedUsingValueDecl *UUVD) { return resolveDependentMember(UUVD->getQualifier()->getAsType(), UUVD->getNameInfo().getName(), ValueFilter); } -std::vector<const NamedDecl *> HeuristicResolver::resolveDependentNameType( - const DependentNameType *DNT) const { +std::vector<const NamedDecl *> +HeuristicResolverImpl::resolveDependentNameType(const DependentNameType *DNT) { + if (auto [_, inserted] = SeenDependentNameTypes.insert(DNT); !inserted) + return {}; return resolveDependentMember( resolveNestedNameSpecifierToType(DNT->getQualifier()), DNT->getIdentifier(), TypeFilter); } std::vector<const NamedDecl *> -HeuristicResolver::resolveTemplateSpecializationType( - const DependentTemplateSpecializationType *DTST) const { +HeuristicResolverImpl::resolveTemplateSpecializationType( + const DependentTemplateSpecializationType *DTST) { return resolveDependentMember( resolveNestedNameSpecifierToType(DTST->getQualifier()), DTST->getIdentifier(), TemplateFilter); } std::vector<const NamedDecl *> -HeuristicResolver::resolveExprToDecls(const Expr *E) const { +HeuristicResolverImpl::resolveExprToDecls(const Expr *E) { if (const auto *ME = dyn_cast<CXXDependentScopeMemberExpr>(E)) { return resolveMemberExpr(ME); } @@ -236,7 +308,7 @@ return {}; } -const Type *HeuristicResolver::resolveExprToType(const Expr *E) const { +const Type *HeuristicResolverImpl::resolveExprToType(const Expr *E) { std::vector<const NamedDecl *> Decls = resolveExprToDecls(E); if (!Decls.empty()) return resolveDeclsToType(Decls, Ctx); @@ -244,8 +316,8 @@ return E->getType().getTypePtr(); } -const Type *HeuristicResolver::resolveNestedNameSpecifierToType( - const NestedNameSpecifier *NNS) const { +const Type *HeuristicResolverImpl::resolveNestedNameSpecifierToType( + const NestedNameSpecifier *NNS) { if (!NNS) return nullptr; @@ -270,8 +342,6 @@ return nullptr; } -namespace { - bool isOrdinaryMember(const NamedDecl *ND) { return ND->isInIdentifierNamespace(Decl::IDNS_Ordinary | Decl::IDNS_Tag | Decl::IDNS_Member); @@ -287,11 +357,9 @@ return false; } -} // namespace - -bool HeuristicResolver::findOrdinaryMemberInDependentClasses( +bool HeuristicResolverImpl::findOrdinaryMemberInDependentClasses( const CXXBaseSpecifier *Specifier, CXXBasePath &Path, - DeclarationName Name) const { + DeclarationName Name) { CXXRecordDecl *RD = resolveTypeToRecordDecl(Specifier->getType().getTypePtr()); if (!RD) @@ -299,9 +367,9 @@ return findOrdinaryMember(RD, Path, Name); } -std::vector<const NamedDecl *> HeuristicResolver::lookupDependentName( +std::vector<const NamedDecl *> HeuristicResolverImpl::lookupDependentName( CXXRecordDecl *RD, DeclarationName Name, - llvm::function_ref<bool(const NamedDecl *ND)> Filter) const { + llvm::function_ref<bool(const NamedDecl *ND)> Filter) { std::vector<const NamedDecl *> Results; // Lookup in the class. @@ -332,9 +400,9 @@ return Results; } -std::vector<const NamedDecl *> HeuristicResolver::resolveDependentMember( +std::vector<const NamedDecl *> HeuristicResolverImpl::resolveDependentMember( const Type *T, DeclarationName Name, - llvm::function_ref<bool(const NamedDecl *ND)> Filter) const { + llvm::function_ref<bool(const NamedDecl *ND)> Filter) { if (!T) return {}; if (auto *ET = T->getAs<EnumType>()) { @@ -349,6 +417,44 @@ } return {}; } +} // namespace + +std::vector<const NamedDecl *> HeuristicResolver::resolveMemberExpr( + const CXXDependentScopeMemberExpr *ME) const { + return HeuristicResolverImpl(Ctx).resolveMemberExpr(ME); +} +std::vector<const NamedDecl *> HeuristicResolver::resolveDeclRefExpr( + const DependentScopeDeclRefExpr *RE) const { + return HeuristicResolverImpl(Ctx).resolveDeclRefExpr(RE); +} +std::vector<const NamedDecl *> +HeuristicResolver::resolveTypeOfCallExpr(const CallExpr *CE) const { + return HeuristicResolverImpl(Ctx).resolveTypeOfCallExpr(CE); +} +std::vector<const NamedDecl *> +HeuristicResolver::resolveCalleeOfCallExpr(const CallExpr *CE) const { + return HeuristicResolverImpl(Ctx).resolveCalleeOfCallExpr(CE); +} +std::vector<const NamedDecl *> HeuristicResolver::resolveUsingValueDecl( + const UnresolvedUsingValueDecl *UUVD) const { + return HeuristicResolverImpl(Ctx).resolveUsingValueDecl(UUVD); +} +std::vector<const NamedDecl *> HeuristicResolver::resolveDependentNameType( + const DependentNameType *DNT) const { + return HeuristicResolverImpl(Ctx).resolveDependentNameType(DNT); +} +std::vector<const NamedDecl *> +HeuristicResolver::resolveTemplateSpecializationType( + const DependentTemplateSpecializationType *DTST) const { + return HeuristicResolverImpl(Ctx).resolveTemplateSpecializationType(DTST); +} +const Type *HeuristicResolver::resolveNestedNameSpecifierToType( + const NestedNameSpecifier *NNS) const { + return HeuristicResolverImpl(Ctx).resolveNestedNameSpecifierToType(NNS); +} +const Type *HeuristicResolver::getPointeeType(const Type *T) const { + return HeuristicResolverImpl(Ctx).getPointeeType(T); +} } // namespace clangd } // namespace clang diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-18.1.1.src/clangd/HeuristicResolver.h new/clang-tools-extra-18.1.2.src/clangd/HeuristicResolver.h --- old/clang-tools-extra-18.1.1.src/clangd/HeuristicResolver.h 2024-03-08 06:27:31.000000000 +0100 +++ new/clang-tools-extra-18.1.2.src/clangd/HeuristicResolver.h 2024-03-19 22:06:42.000000000 +0100 @@ -77,43 +77,6 @@ private: ASTContext &Ctx; - - // Given a tag-decl type and a member name, heuristically resolve the - // name to one or more declarations. - // The current heuristic is simply to look up the name in the primary - // template. This is a heuristic because the template could potentially - // have specializations that declare different members. - // Multiple declarations could be returned if the name is overloaded - // (e.g. an overloaded method in the primary template). - // This heuristic will give the desired answer in many cases, e.g. - // for a call to vector<T>::size(). - std::vector<const NamedDecl *> resolveDependentMember( - const Type *T, DeclarationName Name, - llvm::function_ref<bool(const NamedDecl *ND)> Filter) const; - - // Try to heuristically resolve the type of a possibly-dependent expression - // `E`. - const Type *resolveExprToType(const Expr *E) const; - std::vector<const NamedDecl *> resolveExprToDecls(const Expr *E) const; - - // Helper function for HeuristicResolver::resolveDependentMember() - // which takes a possibly-dependent type `T` and heuristically - // resolves it to a CXXRecordDecl in which we can try name lookup. - CXXRecordDecl *resolveTypeToRecordDecl(const Type *T) const; - - // This is a reimplementation of CXXRecordDecl::lookupDependentName() - // so that the implementation can call into other HeuristicResolver helpers. - // FIXME: Once HeuristicResolver is upstreamed to the clang libraries - // (https://github.com/clangd/clangd/discussions/1662), - // CXXRecordDecl::lookupDepenedentName() can be removed, and its call sites - // can be modified to benefit from the more comprehensive heuristics offered - // by HeuristicResolver instead. - std::vector<const NamedDecl *> lookupDependentName( - CXXRecordDecl *RD, DeclarationName Name, - llvm::function_ref<bool(const NamedDecl *ND)> Filter) const; - bool findOrdinaryMemberInDependentClasses(const CXXBaseSpecifier *Specifier, - CXXBasePath &Path, - DeclarationName Name) const; }; } // namespace clangd diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-18.1.1.src/clangd/unittests/FindTargetTests.cpp new/clang-tools-extra-18.1.2.src/clangd/unittests/FindTargetTests.cpp --- old/clang-tools-extra-18.1.1.src/clangd/unittests/FindTargetTests.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/clang-tools-extra-18.1.2.src/clangd/unittests/FindTargetTests.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -1009,6 +1009,33 @@ )cpp"; EXPECT_DECLS("DependentTemplateSpecializationTypeLoc", "template <typename> struct B"); + + // Dependent name with recursive definition. We don't expect a + // result, but we shouldn't get into a stack overflow either. + Code = R"cpp( + template <int N> + struct waldo { + typedef typename waldo<N - 1>::type::[[next]] type; + }; + )cpp"; + EXPECT_DECLS("DependentNameTypeLoc"); + + // Similar to above but using mutually recursive templates. + Code = R"cpp( + template <int N> + struct odd; + + template <int N> + struct even { + using type = typename odd<N - 1>::type::next; + }; + + template <int N> + struct odd { + using type = typename even<N - 1>::type::[[next]]; + }; + )cpp"; + EXPECT_DECLS("DependentNameTypeLoc"); } TEST_F(TargetDeclTest, TypedefCascade) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clang-tools-extra-18.1.1.src/docs/ReleaseNotes.rst new/clang-tools-extra-18.1.2.src/docs/ReleaseNotes.rst --- old/clang-tools-extra-18.1.1.src/docs/ReleaseNotes.rst 2024-03-08 06:27:31.000000000 +0100 +++ new/clang-tools-extra-18.1.2.src/docs/ReleaseNotes.rst 2024-03-19 22:06:42.000000000 +0100 @@ -51,21 +51,35 @@ Inlay hints ^^^^^^^^^^^ -Diagnostics -^^^^^^^^^^^ - -Semantic Highlighting -^^^^^^^^^^^^^^^^^^^^^ +- Type hints + * Improved heuristics for showing sugared vs. desguared types + * Some hints which provide no information (e.g. ``<dependent-type>``) are now omitted +- Parameter hints + * Parameter hints are now shown for calls through function pointers + * Parameter hints are now shown for calls to a class's ``operator()`` + * No longer show bogus parameter hints for some builtins like ``__builtin_dump_struct`` Compile flags ^^^^^^^^^^^^^ +- System include extractor (``--query-driver``) improvements + * The directory containing builtin headers is now excluded from extracted system includes + * Various flags which can affect the system includes (``--target``, ``--stdlib``, ``-specs``) are now forwarded to the driver + * Fixed a bug where clangd would sometimes try to call a driver that didn't have obj-c support with ``-x objective-c++-header`` + * The driver path is now dot-normalized before being compared to the ``--query-driver`` pattern + * ``--query-driver`` is now supported by ``clangd-indexer`` +- Fixed a regression in clangd 17 where response files would not be expanded + Hover ^^^^^ +- Hover now shows alignment info for fields and records + Code completion ^^^^^^^^^^^^^^^ +- Refined heuristics for determining whether the use of a function can be a call or not + Code actions ^^^^^^^^^^^^ @@ -75,15 +89,25 @@ Signature help ^^^^^^^^^^^^^^ +- Improved support for calls through function pointer types + Cross-references ^^^^^^^^^^^^^^^^ +- Improved support for C++20 concepts +- Find-references now works for labels +- Improvements to template heuristics + Objective-C ^^^^^^^^^^^ Miscellaneous ^^^^^^^^^^^^^ +- Various stability improvements, e.g. crash fixes +- Improved error recovery on invalid code +- Clangd now bails gracefully on assembly and IR source files + Improvements to clang-doc ------------------------- @@ -564,10 +588,15 @@ Removed checks ^^^^^^^^^^^^^^ -Improvements to include-fixer +Improvements to include-cleaner ----------------------------- -The improvements are... +- Support for ``--only-headers`` flag to limit analysis to headers matching a regex +- Recognizes references through ``concept``s +- Builtin headers are not analyzed +- Handling of references through ``friend`` declarations +- Fixes around handling of IWYU pragmas on stdlib headers +- Improved handling around references to/from template specializations Improvements to clang-include-fixer ----------------------------------- ++++++ cmake-18.1.1.src.tar.xz -> cmake-18.1.2.src.tar.xz ++++++ ++++++ compiler-rt-18.1.1.src.tar.xz -> compiler-rt-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/lib/builtins/divtc3.c new/compiler-rt-18.1.2.src/lib/builtins/divtc3.c --- old/compiler-rt-18.1.1.src/lib/builtins/divtc3.c 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/lib/builtins/divtc3.c 2024-03-19 22:06:42.000000000 +0100 @@ -13,7 +13,7 @@ #define QUAD_PRECISION #include "fp_lib.h" -#if defined(CRT_HAS_TF_MODE) +#if defined(CRT_HAS_F128) // Returns: the quotient of (a + ib) / (c + id) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/lib/builtins/fp_lib.h new/compiler-rt-18.1.2.src/lib/builtins/fp_lib.h --- old/compiler-rt-18.1.1.src/lib/builtins/fp_lib.h 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/lib/builtins/fp_lib.h 2024-03-19 22:06:42.000000000 +0100 @@ -22,6 +22,7 @@ #include "int_lib.h" #include "int_math.h" +#include "int_types.h" #include <limits.h> #include <stdbool.h> #include <stdint.h> @@ -93,13 +94,14 @@ COMPILER_RT_ABI fp_t __adddf3(fp_t a, fp_t b); #elif defined QUAD_PRECISION -#if defined(CRT_HAS_TF_MODE) +#if defined(CRT_HAS_F128) && defined(CRT_HAS_128BIT) typedef uint64_t half_rep_t; typedef __uint128_t rep_t; typedef __int128_t srep_t; typedef tf_float fp_t; #define HALF_REP_C UINT64_C #define REP_C (__uint128_t) +#if defined(CRT_HAS_IEEE_TF) // Note: Since there is no explicit way to tell compiler the constant is a // 128-bit integer, we let the constant be casted to 128-bit integer #define significandBits 112 @@ -188,7 +190,10 @@ #undef Word_HiMask #undef Word_LoMask #undef Word_FullMask -#endif // defined(CRT_HAS_TF_MODE) +#endif // defined(CRT_HAS_IEEE_TF) +#else +typedef long double fp_t; +#endif // defined(CRT_HAS_F128) && defined(CRT_HAS_128BIT) #else #error SINGLE_PRECISION, DOUBLE_PRECISION or QUAD_PRECISION must be defined. #endif @@ -196,19 +201,6 @@ #if defined(SINGLE_PRECISION) || defined(DOUBLE_PRECISION) || \ (defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE)) #define typeWidth (sizeof(rep_t) * CHAR_BIT) -#define exponentBits (typeWidth - significandBits - 1) -#define maxExponent ((1 << exponentBits) - 1) -#define exponentBias (maxExponent >> 1) - -#define implicitBit (REP_C(1) << significandBits) -#define significandMask (implicitBit - 1U) -#define signBit (REP_C(1) << (significandBits + exponentBits)) -#define absMask (signBit - 1U) -#define exponentMask (absMask ^ significandMask) -#define oneRep ((rep_t)exponentBias << significandBits) -#define infRep exponentMask -#define quietBit (implicitBit >> 1) -#define qnanRep (exponentMask | quietBit) static __inline rep_t toRep(fp_t x) { const union { @@ -226,6 +218,21 @@ return rep.f; } +#if !defined(QUAD_PRECISION) || defined(CRT_HAS_IEEE_TF) +#define exponentBits (typeWidth - significandBits - 1) +#define maxExponent ((1 << exponentBits) - 1) +#define exponentBias (maxExponent >> 1) + +#define implicitBit (REP_C(1) << significandBits) +#define significandMask (implicitBit - 1U) +#define signBit (REP_C(1) << (significandBits + exponentBits)) +#define absMask (signBit - 1U) +#define exponentMask (absMask ^ significandMask) +#define oneRep ((rep_t)exponentBias << significandBits) +#define infRep exponentMask +#define quietBit (implicitBit >> 1) +#define qnanRep (exponentMask | quietBit) + static __inline int normalize(rep_t *significand) { const int shift = rep_clz(*significand) - rep_clz(implicitBit); *significand <<= shift; @@ -328,6 +335,8 @@ return fromRep(sign | ((rep_t)exp << significandBits) | sig); } +#endif // !defined(QUAD_PRECISION) || defined(CRT_HAS_IEEE_TF) + // Avoid using fmax from libm. static __inline fp_t __compiler_rt_fmaxX(fp_t x, fp_t y) { // If either argument is NaN, return the other argument. If both are NaN, @@ -405,6 +414,8 @@ #define __compiler_rt_logbl crt_logbl #define __compiler_rt_scalbnl crt_scalbnl #define __compiler_rt_fmaxl crt_fmaxl +#define crt_fabstf crt_fabsl +#define crt_copysigntf crt_copysignl #else #error Unsupported TF mode type #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/lib/builtins/int_types.h new/compiler-rt-18.1.2.src/lib/builtins/int_types.h --- old/compiler-rt-18.1.1.src/lib/builtins/int_types.h 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/lib/builtins/int_types.h 2024-03-19 22:06:42.000000000 +0100 @@ -189,12 +189,16 @@ #define CRT_LDBL_IEEE_F128 #endif #define TF_C(x) x##L -#elif __LDBL_MANT_DIG__ == 113 -// Use long double instead of __float128 if it matches the IEEE 128-bit format. +#elif __LDBL_MANT_DIG__ == 113 || \ + (__FLT_RADIX__ == 16 && __LDBL_MANT_DIG__ == 28) +// Use long double instead of __float128 if it matches the IEEE 128-bit format +// or the IBM hexadecimal format. #define CRT_LDBL_128BIT #define CRT_HAS_F128 +#if __LDBL_MANT_DIG__ == 113 #define CRT_HAS_IEEE_TF #define CRT_LDBL_IEEE_F128 +#endif typedef long double tf_float; #define TF_C(x) x##L #elif defined(__FLOAT128__) || defined(__SIZEOF_FLOAT128__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/lib/builtins/multc3.c new/compiler-rt-18.1.2.src/lib/builtins/multc3.c --- old/compiler-rt-18.1.1.src/lib/builtins/multc3.c 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/lib/builtins/multc3.c 2024-03-19 22:06:42.000000000 +0100 @@ -15,7 +15,7 @@ #include "int_lib.h" #include "int_math.h" -#if defined(CRT_HAS_TF_MODE) +#if defined(CRT_HAS_F128) // Returns: the product of a + ib and c + id diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter_default_impl.cpp new/compiler-rt-18.1.2.src/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter_default_impl.cpp --- old/compiler-rt-18.1.1.src/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter_default_impl.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter_default_impl.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -3,7 +3,9 @@ // REQUIRES: has_sancovcc,stable-runtime,linux,x86_64-target-arch -// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters,pc-table -o %t +/// In glibc 2.39+, fprintf has a nonnull attribute. Disable nonnull-attribute, +/// which would increase counters for ubsan. +// RUN: %clangxx -O0 %s -fsanitize-coverage=inline-8bit-counters,pc-table -fno-sanitize=nonnull-attribute -o %t // RUN: rm -f %t-counters %t-pcs // RUN: env %tool_options="cov_8bit_counters_out=%t-counters cov_pcs_out=%t-pcs verbosity=1" %run %t 2>&1 | FileCheck %s diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/compiler-rt-18.1.1.src/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cpp new/compiler-rt-18.1.2.src/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cpp --- old/compiler-rt-18.1.1.src/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/compiler-rt-18.1.2.src/test/sanitizer_common/TestCases/sanitizer_coverage_symbolize.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -7,7 +7,9 @@ // RUN: rm -rf $DIR // RUN: mkdir -p $DIR // RUN: cd $DIR -// RUN: %clangxx -O0 -fsanitize-coverage=trace-pc-guard %s -o %t +/// In glibc 2.39+, fprintf has a nonnull attribute. Disable nonnull-attribute, +/// which would increase counters for ubsan. +// RUN: %clangxx -O0 -fsanitize-coverage=trace-pc-guard -fno-sanitize=nonnull-attribute %s -o %t // RUN: %env_tool_opts=coverage=1 %t 2>&1 | FileCheck %s // RUN: rm -rf $DIR ++++++ libcxx-18.1.1.src.tar.xz -> libcxx-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-18.1.1.src/include/__availability new/libcxx-18.1.2.src/include/__availability --- old/libcxx-18.1.1.src/include/__availability 2024-03-08 06:27:31.000000000 +0100 +++ new/libcxx-18.1.2.src/include/__availability 2024-03-19 22:06:42.000000000 +0100 @@ -72,11 +72,10 @@ # endif #endif -// Availability markup is disabled when building the library, or when the compiler +// Availability markup is disabled when building the library, or when a non-Clang +// compiler is used because only Clang supports the necessary attributes. // doesn't support the proper attributes. -#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || \ - !__has_feature(attribute_availability_with_strict) || !__has_feature(attribute_availability_in_templates) || \ - !__has_extension(pragma_clang_attribute_external_declaration) +#if defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCXXABI_BUILDING_LIBRARY) || !defined(_LIBCPP_COMPILER_CLANG_BASED) # if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) # define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS # endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-18.1.1.src/modules/modules.json.in new/libcxx-18.1.2.src/modules/modules.json.in --- old/libcxx-18.1.1.src/modules/modules.json.in 2024-03-08 06:27:31.000000000 +0100 +++ new/libcxx-18.1.2.src/modules/modules.json.in 2024-03-19 22:06:42.000000000 +0100 @@ -5,7 +5,7 @@ { "logical-name": "std", "source-path": "@LIBCXX_MODULE_RELATIVE_PATH@/std.cppm", - "is-standard-library": true, + "is-std-library": true, "local-arguments": { "system-include-directories": [ "@LIBCXX_MODULE_RELATIVE_PATH@" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-18.1.1.src/src/CMakeLists.txt new/libcxx-18.1.2.src/src/CMakeLists.txt --- old/libcxx-18.1.1.src/src/CMakeLists.txt 2024-03-08 06:27:31.000000000 +0100 +++ new/libcxx-18.1.2.src/src/CMakeLists.txt 2024-03-19 22:06:42.000000000 +0100 @@ -306,7 +306,10 @@ # then its code shouldn't declare them with hidden visibility. They might # actually be provided by a shared library at link time. if (LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS) - append_flags_if_supported(CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete-hidden) + append_flags_if_supported(CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete=force-hidden) + if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG) + append_flags_if_supported(CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete-hidden) + endif() endif() target_compile_options(cxx_static PRIVATE ${CXX_STATIC_LIBRARY_FLAGS}) # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-18.1.1.src/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp new/libcxx-18.1.2.src/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp --- old/libcxx-18.1.1.src/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/libcxx-18.1.2.src/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -0,0 +1,22 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// REQUIRES: stdlib=apple-libc++ + +// Test that using -pedantic-errors doesn't turn off availability annotations. +// This used to be the case because we used __has_extension(...) to enable the +// availability annotations, and -pedantic-errors changes the behavior of +// __has_extension(...) in an incompatible way. + +// ADDITIONAL_COMPILE_FLAGS: -pedantic-errors + +#include <__availability> + +#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) +# error Availability annotations should be enabled on Apple platforms in the system configuration! +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxx-18.1.1.src/test/tools/clang_tidy_checks/CMakeLists.txt new/libcxx-18.1.2.src/test/tools/clang_tidy_checks/CMakeLists.txt --- old/libcxx-18.1.1.src/test/tools/clang_tidy_checks/CMakeLists.txt 2024-03-08 06:27:31.000000000 +0100 +++ new/libcxx-18.1.2.src/test/tools/clang_tidy_checks/CMakeLists.txt 2024-03-19 22:06:42.000000000 +0100 @@ -5,7 +5,7 @@ set(LLVM_DIR_SAVE ${LLVM_DIR}) set(Clang_DIR_SAVE ${Clang_DIR}) -find_package(Clang 18) +find_package(Clang 18.1) if (NOT Clang_FOUND) find_package(Clang 17) endif() ++++++ libcxxabi-18.1.1.src.tar.xz -> libcxxabi-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libcxxabi-18.1.1.src/src/CMakeLists.txt new/libcxxabi-18.1.2.src/src/CMakeLists.txt --- old/libcxxabi-18.1.1.src/src/CMakeLists.txt 2024-03-08 06:27:31.000000000 +0100 +++ new/libcxxabi-18.1.2.src/src/CMakeLists.txt 2024-03-19 22:06:42.000000000 +0100 @@ -265,7 +265,10 @@ # then its code shouldn't declare them with hidden visibility. They might # actually be provided by a shared library at link time. if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS) - target_add_compile_flags_if_supported(cxxabi_static_objects PRIVATE -fvisibility-global-new-delete-hidden) + target_add_compile_flags_if_supported(cxxabi_static_objects PRIVATE -fvisibility-global-new-delete=force-hidden) + if (NOT CXX_SUPPORTS_FVISIBILITY_GLOBAL_NEW_DELETE_EQ_FORCE_HIDDEN_FLAG) + target_add_compile_flags_if_supported(cxxabi_static_objects PRIVATE -fvisibility-global-new-delete-hidden) + endif() endif() # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in libcxx's # __config_site too. Define it in the same way here, to avoid redefinition ++++++ lld-18.1.1.src.tar.xz -> lld-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/COFF/DLL.cpp new/lld-18.1.2.src/COFF/DLL.cpp --- old/lld-18.1.1.src/COFF/DLL.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/COFF/DLL.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -172,7 +172,7 @@ // A chunk for the delay import descriptor table etnry. class DelayDirectoryChunk : public NonSectionChunk { public: - explicit DelayDirectoryChunk(Chunk *n) : dllName(n) {} + explicit DelayDirectoryChunk(Chunk *n) : dllName(n) { setAlignment(4); } size_t getSize() const override { return sizeof(delay_import_directory_table_entry); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/ELF/Arch/LoongArch.cpp new/lld-18.1.2.src/ELF/Arch/LoongArch.cpp --- old/lld-18.1.1.src/ELF/Arch/LoongArch.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/ELF/Arch/LoongArch.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -11,6 +11,7 @@ #include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" +#include "llvm/Support/LEB128.h" using namespace llvm; using namespace llvm::object; @@ -41,6 +42,7 @@ }; } // end anonymous namespace +namespace { enum Op { SUB_W = 0x00110000, SUB_D = 0x00118000, @@ -65,6 +67,7 @@ R_T2 = 14, R_T3 = 15, }; +} // namespace // Mask out the input's lowest 12 bits for use with `pcalau12i`, in sequences // like `pcalau12i + addi.[wd]` or `pcalau12i + {ld,st}.*` where the `pcalau12i` @@ -153,6 +156,17 @@ return (insn & 0xfc000000) == JIRL; } +static void handleUleb128(uint8_t *loc, uint64_t val) { + const uint32_t maxcount = 1 + 64 / 7; + uint32_t count; + const char *error = nullptr; + uint64_t orig = decodeULEB128(loc, &count, nullptr, &error); + if (count > maxcount || (count == maxcount && error)) + errorOrWarn(getErrorLocation(loc) + "extra space for uleb128"); + uint64_t mask = count < maxcount ? (1ULL << 7 * count) - 1 : -1ULL; + encodeULEB128((orig + val) & mask, loc, count); +} + LoongArch::LoongArch() { // The LoongArch ISA itself does not have a limit on page sizes. According to // the ISA manual, the PS (page size) field in MTLB entries and CSR.STLBPS is @@ -394,11 +408,13 @@ case R_LARCH_ADD16: case R_LARCH_ADD32: case R_LARCH_ADD64: + case R_LARCH_ADD_ULEB128: case R_LARCH_SUB6: case R_LARCH_SUB8: case R_LARCH_SUB16: case R_LARCH_SUB32: case R_LARCH_SUB64: + case R_LARCH_SUB_ULEB128: // The LoongArch add/sub relocs behave like the RISCV counterparts; reuse // the RelExpr to avoid code duplication. return R_RISCV_ADD; @@ -633,6 +649,9 @@ case R_LARCH_ADD64: write64le(loc, read64le(loc) + val); return; + case R_LARCH_ADD_ULEB128: + handleUleb128(loc, val); + return; case R_LARCH_SUB6: *loc = (*loc & 0xc0) | ((*loc - val) & 0x3f); return; @@ -648,6 +667,9 @@ case R_LARCH_SUB64: write64le(loc, read64le(loc) - val); return; + case R_LARCH_SUB_ULEB128: + handleUleb128(loc, -val); + return; case R_LARCH_MARK_LA: case R_LARCH_MARK_PCREL: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/ELF/Arch/PPC64.cpp new/lld-18.1.2.src/ELF/Arch/PPC64.cpp --- old/lld-18.1.1.src/ELF/Arch/PPC64.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/ELF/Arch/PPC64.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -26,6 +26,7 @@ constexpr uint64_t ppc64TocOffset = 0x8000; constexpr uint64_t dynamicThreadPointerOffset = 0x8000; +namespace { // The instruction encoding of bits 21-30 from the ISA for the Xform and Dform // instructions that can be used as part of the initial exec TLS sequence. enum XFormOpcd { @@ -139,6 +140,7 @@ PSTXV = PREFIX_8LS | 0xd8000000, PSTXVP = PREFIX_8LS | 0xf8000000 }; + static bool checkPPCLegacyInsn(uint32_t encoding) { PPCLegacyInsn insn = static_cast<PPCLegacyInsn>(encoding); if (insn == PPCLegacyInsn::NOINSN) @@ -164,7 +166,6 @@ 0x8000000003e00000, // S/T (6-10) - The [S/T]X bit moves from 28 to 5. }; -namespace { class PPC64 final : public TargetInfo { public: PPC64(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/ELF/Arch/RISCV.cpp new/lld-18.1.2.src/ELF/Arch/RISCV.cpp --- old/lld-18.1.1.src/ELF/Arch/RISCV.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/ELF/Arch/RISCV.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -57,6 +57,7 @@ const uint64_t dtpOffset = 0x800; +namespace { enum Op { ADDI = 0x13, AUIPC = 0x17, @@ -78,6 +79,7 @@ X_A0 = 10, X_T3 = 28, }; +} // namespace static uint32_t hi20(uint32_t val) { return (val + 0x800) >> 12; } static uint32_t lo12(uint32_t val) { return val & 4095; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/ELF/Writer.cpp new/lld-18.1.2.src/ELF/Writer.cpp --- old/lld-18.1.1.src/ELF/Writer.cpp 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/ELF/Writer.cpp 2024-03-19 22:06:42.000000000 +0100 @@ -261,6 +261,9 @@ Undefined(sym.file, sym.getName(), binding, sym.stOther, sym.type, /*discardedSecIdx=*/map.lookup(sym.section)) .overwrite(sym); + // Eliminate from the symbol table, otherwise we would leave an undefined + // symbol if the symbol is unreferenced in the absence of GC. + sym.isUsedInRegularObj = false; } // If all references to a DSO happen to be weak, the DSO is not added to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/docs/ReleaseNotes.rst new/lld-18.1.2.src/docs/ReleaseNotes.rst --- old/lld-18.1.1.src/docs/ReleaseNotes.rst 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/docs/ReleaseNotes.rst 2024-03-19 22:06:42.000000000 +0100 @@ -163,5 +163,10 @@ is read from object files within the archive. This matches the behaviour of the ELF linker. +SystemZ +------- + +* Add target support for SystemZ (s390x). + Fixes ##### diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/COFF/def-export-cpp.s new/lld-18.1.2.src/test/COFF/def-export-cpp.s --- old/lld-18.1.1.src/test/COFF/def-export-cpp.s 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/test/COFF/def-export-cpp.s 2024-03-19 22:06:42.000000000 +0100 @@ -10,6 +10,7 @@ # IMPLIB: File: foo.dll # IMPLIB: Name type: undecorate +# IMPLIB-NEXT: Export name: GetPathOnDisk # IMPLIB-NEXT: Symbol: __imp_?GetPathOnDisk@@YA_NPEA_W@Z # IMPLIB-NEXT: Symbol: ?GetPathOnDisk@@YA_NPEA_W@Z diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/COFF/def-export-stdcall.s new/lld-18.1.2.src/test/COFF/def-export-stdcall.s --- old/lld-18.1.1.src/test/COFF/def-export-stdcall.s 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/test/COFF/def-export-stdcall.s 2024-03-19 22:06:42.000000000 +0100 @@ -6,15 +6,19 @@ # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix UNDECORATED-EXPORTS %s # UNDECORATED-IMPLIB: Name type: noprefix +# UNDECORATED-IMPLIB-NEXT: Export name: _underscored # UNDECORATED-IMPLIB-NEXT: __imp___underscored # UNDECORATED-IMPLIB-NEXT: __underscored # UNDECORATED-IMPLIB: Name type: undecorate +# UNDECORATED-IMPLIB-NEXT: Export name: fastcall # UNDECORATED-IMPLIB-NEXT: __imp_@fastcall@8 # UNDECORATED-IMPLIB-NEXT: fastcall@8 # UNDECORATED-IMPLIB: Name type: undecorate +# UNDECORATED-IMPLIB-NEXT: Export name: stdcall # UNDECORATED-IMPLIB-NEXT: __imp__stdcall@8 # UNDECORATED-IMPLIB-NEXT: _stdcall@8 # UNDECORATED-IMPLIB: Name type: undecorate +# UNDECORATED-IMPLIB-NEXT: Export name: vectorcall # UNDECORATED-IMPLIB-NEXT: __imp_vectorcall@@8 # UNDECORATED-IMPLIB-NEXT: vectorcall@@8 @@ -30,12 +34,15 @@ # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: @fastcall@8 # DECORATED-IMPLIB-NEXT: __imp_@fastcall@8 # DECORATED-IMPLIB-NEXT: @fastcall@8 # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: _stdcall@8 # DECORATED-IMPLIB-NEXT: __imp__stdcall@8 # DECORATED-IMPLIB-NEXT: _stdcall@8 # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: vectorcall@@8 # DECORATED-IMPLIB-NEXT: __imp_vectorcall@@8 # DECORATED-IMPLIB-NEXT: vectorcall@@8 @@ -51,14 +58,17 @@ # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-MINGW-EXPORTS %s # DECORATED-MINGW-IMPLIB: Name type: name +# DECORATED-MINGW-IMPLIB-NEXT: Export name: @fastcall@8 # DECORATED-MINGW-IMPLIB-NEXT: __imp_@fastcall@8 # DECORATED-MINGW-IMPLIB-NEXT: fastcall@8 # DECORATED-MINGW-IMPLIB: Name type: noprefix +# DECORATED-MINGW-IMPLIB-NEXT: Export name: stdcall@8 # DECORATED-MINGW-IMPLIB-NEXT: __imp__stdcall@8 # DECORATED-MINGW-IMPLIB-NEXT: _stdcall@8 # GNU tools don't support vectorcall, but this test is just to track that # lld's behaviour remains consistent over time. # DECORATED-MINGW-IMPLIB: Name type: name +# DECORATED-MINGW-IMPLIB-NEXT: Export name: vectorcall@@8 # DECORATED-MINGW-IMPLIB-NEXT: __imp_vectorcall@@8 # DECORATED-MINGW-IMPLIB-NEXT: vectorcall@@8 @@ -75,14 +85,17 @@ # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s # MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB: Export name: fastcall # MINGW-KILL-AT-IMPLIB: __imp__fastcall # MINGW-KILL-AT-IMPLIB-NEXT: _fastcall # MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB-NEXT: Export name: stdcall # MINGW-KILL-AT-IMPLIB-NEXT: __imp__stdcall # MINGW-KILL-AT-IMPLIB-NEXT: _stdcall # GNU tools don't support vectorcall, but this test is just to track that # lld's behaviour remains consistent over time. # MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB-NEXT: Export name: vectorcall # MINGW-KILL-AT-IMPLIB-NEXT: __imp__vectorcall # MINGW-KILL-AT-IMPLIB-NEXT: _vectorcall diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/COFF/delayimports-armnt.yaml new/lld-18.1.2.src/test/COFF/delayimports-armnt.yaml --- old/lld-18.1.1.src/test/COFF/delayimports-armnt.yaml 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/test/COFF/delayimports-armnt.yaml 2024-03-19 22:06:42.000000000 +0100 @@ -6,6 +6,7 @@ # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s # RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck --check-prefix=DISASM %s +# RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DIR %s # IMPORT: Format: COFF-ARM # IMPORT-NEXT: Arch: thumb @@ -13,9 +14,9 @@ # IMPORT-NEXT: DelayImport { # IMPORT-NEXT: Name: library.dll # IMPORT-NEXT: Attributes: 0x1 -# IMPORT-NEXT: ModuleHandle: 0x3000 -# IMPORT-NEXT: ImportAddressTable: 0x3008 -# IMPORT-NEXT: ImportNameTable: 0x2040 +# IMPORT-NEXT: ModuleHandle: 0x3008 +# IMPORT-NEXT: ImportAddressTable: 0x3010 +# IMPORT-NEXT: ImportNameTable: 0x2044 # IMPORT-NEXT: BoundDelayImportTable: 0x0 # IMPORT-NEXT: UnloadDelayImportTable: 0x0 # IMPORT-NEXT: Import { @@ -43,7 +44,7 @@ # BASEREL-NEXT: } # BASEREL-NEXT: Entry { # BASEREL-NEXT: Type: HIGHLOW -# BASEREL-NEXT: Address: 0x3008 +# BASEREL-NEXT: Address: 0x3010 # BASEREL-NEXT: } # BASEREL-NEXT: Entry { # BASEREL-NEXT: Type: ABSOLUTE @@ -52,20 +53,24 @@ # BASEREL-NEXT: ] # # DISASM: 00401000 <.text>: -# DISASM: 40100c: f243 0c08 movw r12, #12296 +# DISASM: 40100c: f243 0c10 movw r12, #12304 # DISASM-NEXT: f2c0 0c40 movt r12, #64 # DISASM-NEXT: f000 b800 b.w {{.+}} @ imm = #0 # DISASM-NEXT: e92d 480f push.w {r0, r1, r2, r3, r11, lr} # DISASM-NEXT: f20d 0b10 addw r11, sp, #16 # DISASM-NEXT: ed2d 0b10 vpush {d0, d1, d2, d3, d4, d5, d6, d7} # DISASM-NEXT: 4661 mov r1, r12 -# DISASM-NEXT: f242 0000 movw r0, #8192 +# DISASM-NEXT: f242 0004 movw r0, #8196 # DISASM-NEXT: f2c0 0040 movt r0, #64 # DISASM-NEXT: f7ff ffe7 bl 0x401000 <.text> # DISASM-NEXT: 4684 mov r12, r0 # DISASM-NEXT: ecbd 0b10 vpop {d0, d1, d2, d3, d4, d5, d6, d7} # DISASM-NEXT: e8bd 480f pop.w {r0, r1, r2, r3, r11, lr} # DISASM-NEXT: 4760 bx r12 +# +# DIR: DelayImportDescriptorRVA: 0x2004 +# DIR-NEXT: DelayImportDescriptorSize: 0x40 + --- !COFF header: @@ -80,6 +85,14 @@ - VirtualAddress: 0 SymbolName: __imp_function Type: IMAGE_REL_ARM_MOV32T + - Name: .rdata + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ] + Alignment: 1 + SectionData: 01 + - Name: .data + Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ] + Alignment: 1 + SectionData: 02 symbols: - Name: .text Value: 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/COFF/dllexport.s new/lld-18.1.2.src/test/COFF/dllexport.s --- old/lld-18.1.1.src/test/COFF/dllexport.s 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/test/COFF/dllexport.s 2024-03-19 22:06:42.000000000 +0100 @@ -6,15 +6,19 @@ # RUN: llvm-readobj --coff-exports %t.dll | FileCheck -check-prefix DECORATED-EXPORTS %s # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: @fastcall@8 # DECORATED-IMPLIB-NEXT: __imp_@fastcall@8 # DECORATED-IMPLIB-NEXT: @fastcall@8 # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: _stdcall@8 # DECORATED-IMPLIB-NEXT: __imp__stdcall@8 # DECORATED-IMPLIB-NEXT: _stdcall@8 # DECORATED-IMPLIB: Name type: noprefix +# DECORATED-IMPLIB-NEXT: Export name: _underscored # DECORATED-IMPLIB-NEXT: __imp___underscored # DECORATED-IMPLIB-NEXT: __underscored # DECORATED-IMPLIB: Name type: name +# DECORATED-IMPLIB-NEXT: Export name: vectorcall@@8 # DECORATED-IMPLIB-NEXT: __imp_vectorcall@@8 # DECORATED-IMPLIB-NEXT: vectorcall@@8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/ELF/linkerscript/discard-section.s new/lld-18.1.2.src/test/ELF/linkerscript/discard-section.s --- old/lld-18.1.1.src/test/ELF/linkerscript/discard-section.s 2024-03-08 06:27:31.000000000 +0100 +++ new/lld-18.1.2.src/test/ELF/linkerscript/discard-section.s 2024-03-19 22:06:42.000000000 +0100 @@ -9,6 +9,9 @@ # RUN: ld.lld -r -T a.lds a.o b.o -o a.ro 2>&1 | FileCheck %s --check-prefix=WARNING --implicit-check-not=warning: # RUN: llvm-readelf -r -s a.ro | FileCheck %s --check-prefix=RELOC +# RUN: ld.lld -r --gc-sections -T a.lds a.o b.o -o a.gc.ro --no-fatal-warnings +# RUN: llvm-readelf -r -s a.gc.ro | FileCheck %s --check-prefix=RELOC-GC + # LOCAL: error: relocation refers to a discarded section: .aaa # LOCAL-NEXT: >>> defined in a.o # LOCAL-NEXT: >>> referenced by a.o:(.bbb+0x0) @@ -32,16 +35,18 @@ # WARNING: warning: relocation refers to a discarded section: .aaa # WARNING-NEXT: >>> referenced by a.o:(.rela.bbb+0x0) +## GNU ld reports "defined in discarded secion" errors even in -r mode. +## We set the symbol index to 0. # RELOC: Relocation section '.rela.bbb' at offset {{.*}} contains 1 entries: # RELOC-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend # RELOC-NEXT: 0000000000000000 0000000000000000 R_X86_64_NONE 0 # RELOC-EMPTY: # RELOC-NEXT: Relocation section '.rela.data' at offset {{.*}} contains 4 entries: # RELOC-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend -# RELOC-NEXT: 0000000000000000 0000000500000001 R_X86_64_64 0000000000000000 global + 0 -# RELOC-NEXT: 0000000000000008 0000000700000001 R_X86_64_64 0000000000000000 weak + 0 -# RELOC-NEXT: 0000000000000010 0000000600000001 R_X86_64_64 0000000000000000 weakref1 + 0 -# RELOC-NEXT: 0000000000000018 0000000800000001 R_X86_64_64 0000000000000000 weakref2 + 0 +# RELOC-NEXT: 0000000000000000 0000000000000001 R_X86_64_64 0 +# RELOC-NEXT: 0000000000000008 0000000000000001 R_X86_64_64 0 +# RELOC-NEXT: 0000000000000010 0000000000000001 R_X86_64_64 0 +# RELOC-NEXT: 0000000000000018 0000000000000001 R_X86_64_64 0 # RELOC: Num: Value Size Type Bind Vis Ndx Name # RELOC-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND @@ -49,23 +54,25 @@ # RELOC-NEXT: 2: 0000000000000000 0 SECTION LOCAL DEFAULT 2 .bbb # RELOC-NEXT: 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 .data # RELOC-NEXT: 4: 0000000000000000 0 NOTYPE GLOBAL DEFAULT 1 _start -# RELOC-NEXT: 5: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND global -# RELOC-NEXT: 6: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND weakref1 -# RELOC-NEXT: 7: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND weak -# RELOC-NEXT: 8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND weakref2 # RELOC-EMPTY: +# RELOC-GC: There are no relocations in this file. + #--- a.s .globl _start _start: .section .aaa,"a" -.globl global, weakref1 +.globl global, weakref1, unused .weak weak, weakref2 global: weak: weakref1: weakref2: +## Eliminate `unused` just like GC discarded definitions. +## Linux kernel's CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y configuration expects +## that the unreferenced `unused` is not emitted to .symtab. +unused: .quad 0 .section .bbb,"aw" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lld-18.1.1.src/test/ELF/loongarch-reloc-leb128.s new/lld-18.1.2.src/test/ELF/loongarch-reloc-leb128.s --- old/lld-18.1.1.src/test/ELF/loongarch-reloc-leb128.s 1970-01-01 01:00:00.000000000 +0100 +++ new/lld-18.1.2.src/test/ELF/loongarch-reloc-leb128.s 2024-03-19 22:06:42.000000000 +0100 @@ -0,0 +1,102 @@ +# REQUIRES: loongarch +# RUN: rm -rf %t && split-file %s %t && cd %t + +# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax a.s -o a.o +# RUN: llvm-readobj -r -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a.o | FileCheck %s --check-prefix=REL +# RUN: ld.lld -shared --gc-sections a.o -o a.so +# RUN: llvm-readelf -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a.so | FileCheck %s + +# RUN: llvm-mc --filetype=obj --triple=loongarch32 --mattr=+relax a.s -o a32.o +# RUN: llvm-readobj -r -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a32.o | FileCheck %s --check-prefix=REL +# RUN: ld.lld -shared --gc-sections a32.o -o a32.so +# RUN: llvm-readelf -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a32.so | FileCheck %s + +# RUN: llvm-mc --filetype=obj --triple=loongarch32 --mattr=+relax extraspace.s -o extraspace32.o +# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax extraspace.s -o extraspace64.o +# RUN: not ld.lld -shared extraspace32.o 2>&1 | FileCheck %s --check-prefix=ERROR +# RUN: not ld.lld -shared extraspace64.o 2>&1 | FileCheck %s --check-prefix=ERROR +# ERROR: error: extraspace{{.*}}.o:(.rodata+0x0): extra space for uleb128 + +#--- a.s +.cfi_startproc +.cfi_lsda 0x1b,.LLSDA0 +.cfi_endproc + +.section .text.w,"axR" +break 0; break 0; break 0; w1: + .p2align 4 # 4 bytes after relaxation +w2: break 0 + +.section .text.x,"ax" +break 0; break 0; break 0; x1: + .p2align 4 # 4 bytes after relaxation +x2: break 0 + +.section .gcc_except_table,"a" +.LLSDA0: +.uleb128 w2-w1+116 # initial value: 0x0080 +.uleb128 w1-w2+141 # initial value: 0x0080 +.uleb128 w2-w1+16372 # initial value: 0x008080 +.uleb128 w1-w2+16397 # initial value: 0x008080 +.uleb128 w2-w1+2097140 # initial value: 0x00808080 +.uleb128 w1-w2+2097165 # initial value: 0x00808080 + +.section .debug_rnglists +.uleb128 w2-w1+116 # initial value: 0x0080 +.uleb128 w1-w2+141 # initial value: 0x0080 +.uleb128 w2-w1+16372 # initial value: 0x008080 +.uleb128 w1-w2+16397 # initial value: 0x008080 +.uleb128 w2-w1+2097140 # initial value: 0x00808080 +.uleb128 w1-w2+2097165 # initial value: 0x00808080 + +.section .debug_loclists +.uleb128 x2-x1 # references discarded symbols + +# REL: Section ({{.*}}) .rela.debug_rnglists { +# REL-NEXT: 0x0 R_LARCH_ADD_ULEB128 w2 0x74 +# REL-NEXT: 0x0 R_LARCH_SUB_ULEB128 w1 0x0 +# REL-NEXT: 0x2 R_LARCH_ADD_ULEB128 w1 0x8D +# REL-NEXT: 0x2 R_LARCH_SUB_ULEB128 w2 0x0 +# REL-NEXT: 0x4 R_LARCH_ADD_ULEB128 w2 0x3FF4 +# REL-NEXT: 0x4 R_LARCH_SUB_ULEB128 w1 0x0 +# REL-NEXT: 0x7 R_LARCH_ADD_ULEB128 w1 0x400D +# REL-NEXT: 0x7 R_LARCH_SUB_ULEB128 w2 0x0 +# REL-NEXT: 0xA R_LARCH_ADD_ULEB128 w2 0x1FFFF4 +# REL-NEXT: 0xA R_LARCH_SUB_ULEB128 w1 0x0 +# REL-NEXT: 0xE R_LARCH_ADD_ULEB128 w1 0x20000D +# REL-NEXT: 0xE R_LARCH_SUB_ULEB128 w2 0x0 +# REL-NEXT: } +# REL: Section ({{.*}}) .rela.debug_loclists { +# REL-NEXT: 0x0 R_LARCH_ADD_ULEB128 x2 0x0 +# REL-NEXT: 0x0 R_LARCH_SUB_ULEB128 x1 0x0 +# REL-NEXT: } + +# REL: Hex dump of section '.gcc_except_table': +# REL-NEXT: 0x00000000 80008000 80800080 80008080 80008080 . +# REL-NEXT: 0x00000010 8000 . +# REL: Hex dump of section '.debug_rnglists': +# REL-NEXT: 0x00000000 80008000 80800080 80008080 80008080 . +# REL-NEXT: 0x00000010 8000 . +# REL: Hex dump of section '.debug_loclists': +# REL-NEXT: 0x00000000 00 . + +# CHECK: Hex dump of section '.gcc_except_table': +# CHECK-NEXT: 0x[[#%x,]] f8008901 f8ff0089 8001f8ff ff008980 . +# CHECK-NEXT: 0x[[#%x,]] 8001 . +# CHECK: Hex dump of section '.debug_rnglists': +# CHECK-NEXT: 0x00000000 f8008901 f8ff0089 8001f8ff ff008980 . +# CHECK-NEXT: 0x00000010 8001 . +# CHECK: Hex dump of section '.debug_loclists': +# CHECK-NEXT: 0x00000000 00 . + +#--- extraspace.s +.text +w1: + la.pcrel $t0, w1 +w2: + +.rodata +.reloc ., R_LARCH_ADD_ULEB128, w2 +.reloc ., R_LARCH_SUB_ULEB128, w1 +.fill 10, 1, 0x80 +.byte 1 ++++++ lldb-18.1.1.src.tar.xz -> lldb-18.1.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm18/lldb-18.1.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm18.new.1905/lldb-18.1.2.src.tar.xz differ: char 27, line 1 ++++++ llvm-18.1.1.src.tar.xz -> llvm-18.1.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm18/llvm-18.1.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm18.new.1905/llvm-18.1.2.src.tar.xz differ: char 27, line 1 ++++++ llvm-do-not-install-static-libraries.patch ++++++ --- /var/tmp/diff_new_pack.6VvYZd/_old 2024-03-25 21:06:48.178107634 +0100 +++ /var/tmp/diff_new_pack.6VvYZd/_new 2024-03-25 21:06:48.182107781 +0100 @@ -2,10 +2,10 @@ want after installation. By not copying them in the first place we reduce the disk usage during installation. -Index: clang-18.1.1.src/cmake/modules/AddClang.cmake +Index: clang-18.1.2.src/cmake/modules/AddClang.cmake =================================================================== ---- a/clang-18.1.1.src/cmake/modules/AddClang.cmake -+++ b/clang-18.1.1.src/cmake/modules/AddClang.cmake +--- a/clang-18.1.2.src/cmake/modules/AddClang.cmake ++++ b/clang-18.1.2.src/cmake/modules/AddClang.cmake @@ -106,12 +106,15 @@ macro(add_clang_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN) @@ -68,10 +68,10 @@ endif() if (ARG_MODULE) set_target_properties(${name} PROPERTIES FOLDER "Loadable modules") -Index: lld-18.1.1.src/cmake/modules/AddLLD.cmake +Index: lld-18.1.2.src/cmake/modules/AddLLD.cmake =================================================================== ---- a/lld-18.1.1.src/cmake/modules/AddLLD.cmake -+++ b/lld-18.1.1.src/cmake/modules/AddLLD.cmake +--- a/lld-18.1.2.src/cmake/modules/AddLLD.cmake ++++ b/lld-18.1.2.src/cmake/modules/AddLLD.cmake @@ -17,13 +17,6 @@ macro(add_lld_library name) if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) @@ -86,10 +86,10 @@ if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) add_llvm_install_targets(install-${name} DEPENDS ${name} -Index: polly-18.1.1.src/cmake/polly_macros.cmake +Index: polly-18.1.2.src/cmake/polly_macros.cmake =================================================================== ---- a/polly-18.1.1.src/cmake/polly_macros.cmake -+++ b/polly-18.1.1.src/cmake/polly_macros.cmake +--- a/polly-18.1.2.src/cmake/polly_macros.cmake ++++ b/polly-18.1.2.src/cmake/polly_macros.cmake @@ -42,15 +42,17 @@ macro(add_polly_library name) llvm_config(${name} ${LLVM_LINK_COMPONENTS}) endif( LLVM_LINK_COMPONENTS ) @@ -116,10 +116,10 @@ endmacro(add_polly_library) macro(add_polly_loadable_module name) -Index: polly-18.1.1.src/lib/CMakeLists.txt +Index: polly-18.1.2.src/lib/CMakeLists.txt =================================================================== ---- a/polly-18.1.1.src/lib/CMakeLists.txt -+++ b/polly-18.1.1.src/lib/CMakeLists.txt +--- a/polly-18.1.2.src/lib/CMakeLists.txt ++++ b/polly-18.1.2.src/lib/CMakeLists.txt @@ -109,7 +109,7 @@ set_target_properties(PollyCore PROPERTI # It depends on all library it needs, such that with # LLVM_POLLY_LINK_INTO_TOOLS=ON, its dependencies like PollyISL are linked as ++++++ llvm-docs-18.1.1.src.tar.xz -> llvm-docs-18.1.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm18/llvm-docs-18.1.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm18.new.1905/llvm-docs-18.1.2.src.tar.xz differ: char 15, line 1 ++++++ llvm-normally-versioned-libllvm.patch ++++++ --- /var/tmp/diff_new_pack.6VvYZd/_old 2024-03-25 21:06:48.210108809 +0100 +++ /var/tmp/diff_new_pack.6VvYZd/_new 2024-03-25 21:06:48.214108957 +0100 @@ -51,18 +51,17 @@ // If LLVM_LINK_DYLIB is ON, the single shared library will be returned // for "--libs", etc, if they exist. This behaviour can be overridden with -Index: llvm-18.1.0rc4.src/tools/llvm-shlib/CMakeLists.txt +Index: llvm-18.1.2.src/tools/llvm-shlib/CMakeLists.txt =================================================================== ---- llvm-18.1.0rc4.src.orig/tools/llvm-shlib/CMakeLists.txt -+++ llvm-18.1.0rc4.src/tools/llvm-shlib/CMakeLists.txt -@@ -34,9 +34,6 @@ if(LLVM_BUILD_LLVM_DYLIB) - set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN) +--- llvm-18.1.2.src.orig/tools/llvm-shlib/CMakeLists.txt ++++ llvm-18.1.2.src/tools/llvm-shlib/CMakeLists.txt +@@ -37,8 +37,6 @@ if (WIN32) + add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) + else() + add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB OUTPUT_NAME LLVM ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) +- # Add symlink for backwards compatibility with old library name +- llvm_install_library_symlink(LLVM-${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX} $<TARGET_FILE_NAME:LLVM> SHARED FULL_DEST COMPONENT LLVM) endif() - add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB OUTPUT_NAME LLVM ${INSTALL_WITH_TOOLCHAIN} ${SOURCES}) -- # Add symlink for backwards compatibility with old library name -- get_target_property(LLVM_DYLIB_SOVERSION LLVM SOVERSION) -- llvm_install_library_symlink(LLVM-${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX} LLVM SHARED COMPONENT LLVM SOVERSION ${LLVM_DYLIB_SOVERSION}) list(REMOVE_DUPLICATES LIB_NAMES) - if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") ++++++ openmp-18.1.1.src.tar.xz -> openmp-18.1.2.src.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/docs/ReleaseNotes.rst new/openmp-18.1.2.src/docs/ReleaseNotes.rst --- old/openmp-18.1.1.src/docs/ReleaseNotes.rst 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/docs/ReleaseNotes.rst 2024-03-19 22:06:42.000000000 +0100 @@ -19,3 +19,5 @@ Non-comprehensive list of changes in this release ================================================= + +* SystemZ support added. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/runtime/src/kmp.h new/openmp-18.1.2.src/runtime/src/kmp.h --- old/openmp-18.1.1.src/runtime/src/kmp.h 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/runtime/src/kmp.h 2024-03-19 22:06:42.000000000 +0100 @@ -2506,7 +2506,7 @@ union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* Same fields as in the #else branch, but in reverse order */ unsigned all : 1; unsigned unused : 3; @@ -2671,7 +2671,7 @@ #endif // BUILD_TIED_TASK_STACK typedef struct kmp_tasking_flags { /* Total struct must be exactly 32 bits */ -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) /* Same fields as in the #else branch, but in reverse order */ #if OMPX_TASKGRAPH unsigned reserved31 : 6; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/runtime/src/kmp_lock.h new/openmp-18.1.2.src/runtime/src/kmp_lock.h --- old/openmp-18.1.1.src/runtime/src/kmp_lock.h 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/runtime/src/kmp_lock.h 2024-03-19 22:06:42.000000000 +0100 @@ -120,7 +120,8 @@ struct kmp_base_tas_lock { // KMP_LOCK_FREE(tas) => unlocked; locked: (gtid+1) of owning thread -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ && __LP64__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) && \ + __LP64__ // Flip the ordering of the high and low 32-bit member to be consistent // with the memory layout of the address in 64-bit big-endian. kmp_int32 depth_locked; // depth locked, for nested locks only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/runtime/test/tasking/bug_nested_proxy_task.c new/openmp-18.1.2.src/runtime/test/tasking/bug_nested_proxy_task.c --- old/openmp-18.1.1.src/runtime/test/tasking/bug_nested_proxy_task.c 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/runtime/test/tasking/bug_nested_proxy_task.c 2024-03-19 22:06:42.000000000 +0100 @@ -50,7 +50,7 @@ union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/runtime/test/tasking/bug_proxy_task_dep_waiting.c new/openmp-18.1.2.src/runtime/test/tasking/bug_proxy_task_dep_waiting.c --- old/openmp-18.1.1.src/runtime/test/tasking/bug_proxy_task_dep_waiting.c 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/runtime/test/tasking/bug_proxy_task_dep_waiting.c 2024-03-19 22:06:42.000000000 +0100 @@ -47,7 +47,7 @@ union { kmp_uint8 flag; // flag as an unsigned char struct { // flag as a set of 8 bits -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openmp-18.1.1.src/runtime/test/tasking/hidden_helper_task/common.h new/openmp-18.1.2.src/runtime/test/tasking/hidden_helper_task/common.h --- old/openmp-18.1.1.src/runtime/test/tasking/hidden_helper_task/common.h 2024-03-08 06:27:31.000000000 +0100 +++ new/openmp-18.1.2.src/runtime/test/tasking/hidden_helper_task/common.h 2024-03-19 22:06:42.000000000 +0100 @@ -17,7 +17,7 @@ union { unsigned char flag; struct { -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) unsigned all : 1; unsigned unused : 3; unsigned set : 1; ++++++ polly-18.1.1.src.tar.xz -> polly-18.1.2.src.tar.xz ++++++ /work/SRC/openSUSE:Factory/llvm18/polly-18.1.1.src.tar.xz /work/SRC/openSUSE:Factory/.llvm18.new.1905/polly-18.1.2.src.tar.xz differ: char 26, line 1 ++++++ runtimes-18.1.1.src.tar.xz -> runtimes-18.1.2.src.tar.xz ++++++ ++++++ third-party-18.1.1.src.tar.xz -> third-party-18.1.2.src.tar.xz ++++++
