[all-commits] [llvm/llvm-project] e4903d: [CUDA/HIP] Remove argument from module ctor/dtor s...

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Sat Apr 9 03:39:16 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e4903d8be399864cc978236fc4a28087f91c20fe
      https://github.com/llvm/llvm-project/commit/e4903d8be399864cc978236fc4a28087f91c20fe
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2022-04-09 (Sat, 09 Apr 2022)

  Changed paths:
    M clang/lib/CodeGen/CGCUDANV.cpp
    M clang/test/CodeGenCUDA/device-stub.cu

  Log Message:
  -----------
  [CUDA/HIP] Remove argument from module ctor/dtor signatures

In theory, constructors can take arguments when called via .init_array
where at least glibc passes in (argc, argv, envp). This isn't used in
the generated code and if it was, the first argument should be an
integer, not a pointer. For destructors registered via atexit, the
function should never take an argument.

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




More information about the All-commits mailing list