[all-commits] [llvm/llvm-project] b623a0: [CIR] Support pointer-to-int global initializers (...

Kunal Dubey via All-commits all-commits at lists.llvm.org
Tue Sep 15 09:57:24 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b623a0c6d49f2c8e1031216ead5641c3bf57f1d1
      https://github.com/llvm/llvm-project/commit/b623a0c6d49f2c8e1031216ead5641c3bf57f1d1
  Author: Kunal Dubey <xakep8 at protonmail.com>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
    M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
    M clang/test/CIR/CodeGen/compound_literal.c
    A clang/test/CIR/CodeGen/global-address-to-int.c

  Log Message:
  -----------
  [CIR] Support pointer-to-int global initializers (#220643)

This allows CIR to emit global initializers where a constant address is
cast to an integer.

This fixes compound literals like `unsigned long addr = (unsigned
long)(int[]){1, 2, 3}` and also handles global variable, array element
and function addresses cast to integers.

Fixes #216618



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list