[all-commits] [llvm/llvm-project] 2b680e: [Analysis] Fix GCC warnings on ABI annotations (#2...

Bruno De Fraine via All-commits all-commits at lists.llvm.org
Mon Sep 14 14:28:37 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b680eecc9f7fad9fee351219aa3c45320f609ea
      https://github.com/llvm/llvm-project/commit/2b680eecc9f7fad9fee351219aa3c45320f609ea
  Author: Bruno De Fraine <bruno.defraine at globalfoundries.com>
  Date:   2026-09-14 (Mon, 14 Sep 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/DominanceFrontier.h
    M llvm/include/llvm/Analysis/RegionInfo.h
    M llvm/lib/Analysis/DominanceFrontier.cpp
    M llvm/lib/Analysis/RegionInfo.cpp

  Log Message:
  -----------
  [Analysis] Fix GCC warnings on ABI annotations (#222286)

The GCC build is cluttered by type attribute warnings on some header
files:

```
llvm/include/llvm/Analysis/RegionInfo.h:898:41: warning: type attributes ignored after type is already defined [-Wattributes]
  898 | extern template class LLVM_TEMPLATE_ABI RegionBase<RegionTraits<Function>>;
      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

The type attributes originate from PR #199019. The warnings occur
because the
specific template instantiation is triggered implicitly earlier, without
the
type attribute. This can be fixed by placing the extern template
declaration
before the implicit use.

Also, the implementation files were using `LLVM_TEMPLATE_ABI` instead of
`LLVM_EXPORT_TEMPLATE`, contrary to the guidance in
`llvm/docs/InterfaceExportAnnotations.rst` ("Explicitly Instantiated
Template
Classes"). This would trigger the same type of GCC warning in the
implementation file.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list