[all-commits] [llvm/llvm-project] 896aad: [NFCI][mlir][Tests] Rename identifiers minor/major...

Roger Ferrer Ibáñez via All-commits all-commits at lists.llvm.org
Mon Jul 31 07:38:04 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 896aada3b632bd58297acc3745d61fc24904f34e
      https://github.com/llvm/llvm-project/commit/896aada3b632bd58297acc3745d61fc24904f34e
  Author: Roger Ferrer Ibanez <roger.ferrer at bsc.es>
  Date:   2023-07-31 (Mon, 31 Jul 2023)

  Changed paths:
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestDialect.h
    M mlir/test/lib/Dialect/Test/TestDialectInterfaces.cpp
    M mlir/test/lib/IR/TestBytecodeCallbacks.cpp

  Log Message:
  -----------
  [NFCI][mlir][Tests] Rename identifiers minor/major to avoid clashes with system headers

Identifiers major and minor are often already taken in POSIX systems due
to their presence in <sys/types.h> as part of the makedev library
function.

This causes compilation failures on FreeBSD and Linux systems with glibc
<2.28.

This change renames the identifiers to major_/minor_.

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




More information about the All-commits mailing list