[all-commits] [llvm/llvm-project] 4eaf58: [clang] Fix function pointer address space

elizabethandrews via All-commits all-commits at lists.llvm.org
Thu Jan 13 08:12:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4eaf5846d0e738264d9328b4a919bc352ea83b7a
      https://github.com/llvm/llvm-project/commit/4eaf5846d0e738264d9328b4a919bc352ea83b7a
  Author: Elizabeth Andrews <elizabeth.andrews at intel.com>
  Date:   2022-01-13 (Thu, 13 Jan 2022)

  Changed paths:
    M clang/include/clang/AST/ASTContext.h
    M clang/include/clang/Basic/TargetInfo.h
    M clang/lib/AST/ASTContext.cpp
    M clang/lib/Basic/TargetInfo.cpp
    M clang/lib/Basic/Targets/AVR.h
    M clang/lib/CodeGen/CodeGenTypes.cpp
    A clang/test/CodeGen/avr/functionptr-addrspace.c
    A clang/test/CodeGenSYCL/functionptr-addrspace.cpp

  Log Message:
  -----------
  [clang] Fix function pointer address space

Functions pointers should be created with program address space. This
patch introduces program address space in TargetInfo. Targets with
non-default (default is 0) address space for functions should explicitly
set this value. This patch fixes a crash on lvalue reference to function
pointer (in device code) when using oneAPI DPC++ compiler.

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




More information about the All-commits mailing list