[all-commits] [llvm/llvm-project] 74f207: [clang] Fix emitVoidPtrVAArg for non-zero default ...

Jessica Clarke via All-commits all-commits at lists.llvm.org
Mon May 15 12:27:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74f207883bc5fe2a7300c4b4f1ff080a107ab148
      https://github.com/llvm/llvm-project/commit/74f207883bc5fe2a7300c4b4f1ff080a107ab148
  Author: Jessica Clarke <jrtc27 at jrtc27.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M clang/lib/CodeGen/TargetInfo.cpp

  Log Message:
  -----------
  [clang] Fix emitVoidPtrVAArg for non-zero default alloca address space

Indirect arguments are passed on the stack and so va_arg should use the
default alloca address space, not hard-code 0, for pointers to those.
The only in-tree target with a non-zero default alloca address space is
AMDGPU, but that does not support variadic arguments, so we cannot test
this upstream. However, downstream in CHERI LLVM (and Morello LLVM, a
further fork of that) we have targets that do both and so require this
change.

Reviewed By: arsenm

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




More information about the All-commits mailing list