[all-commits] [llvm/llvm-project] d3718f: [LLVM] remove extern template declarations of Gene...

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Tue Aug 1 06:23:22 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d3718f1e4f10b89ab56c6c394e2eaec897798bba
      https://github.com/llvm/llvm-project/commit/d3718f1e4f10b89ab56c6c394e2eaec897798bba
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2023-08-01 (Tue, 01 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/CycleAnalysis.h
    M llvm/include/llvm/CodeGen/MachineCycleAnalysis.h
    M llvm/include/llvm/IR/CycleInfo.h

  Log Message:
  -----------
  [LLVM] remove extern template declarations of GenericCycleInfo

Having an extern template declaration prevents implicit instantiation of
templates, which causes linker errors when building with shared libraries. For
example, the sources in libAnalysis do not contain any explicit instantiation of
the CycleInfo, which is a specialization of GenericCycleInfo. Thus, any calls to
functions defined in the body of GenericCycleInfo produce undefined references.
The absence of any extern template declaration allows a local instance of these
functions to be created.




More information about the All-commits mailing list