[all-commits] [llvm/llvm-project] 16949c: [compiler-rt] Include system headers before option...

Dimitry Andric via All-commits all-commits at lists.llvm.org
Thu Apr 20 11:35:12 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16949c5c48ab475d34547d4bbbe91df7efe73120
      https://github.com/llvm/llvm-project/commit/16949c5c48ab475d34547d4bbbe91df7efe73120
  Author: Dimitry Andric <dimitry at andric.com>
  Date:   2023-04-20 (Thu, 20 Apr 2023)

  Changed paths:
    M compiler-rt/lib/builtins/cpu_model.c

  Log Message:
  -----------
  [compiler-rt] Include system headers before optionally defining HWCAP macros

In https://reviews.llvm.org/D141285 the optional definitions of `HWCAP`
macros were moved to before their usage. However, they were also moved
to before the inclusion of system headers which can optionally define
them. If any of those system headers then actually defined any of the
`HWCAP` macros, it would result in a redefinition error.

Move the system header includes to just before the optional definitions,
to avoid this problem.

Reviewed By: ilinpv

Differential Revision: https://reviews.llvm.org/D148819




More information about the All-commits mailing list