[all-commits] [llvm/llvm-project] 678891: [CIR] Implement lowering for const-emitted global ...

Erich Keane via All-commits all-commits at lists.llvm.org
Tue Jun 2 16:51:38 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 678891b586ab0f3b97c83987eb2df0d2d5743ffb
      https://github.com/llvm/llvm-project/commit/678891b586ab0f3b97c83987eb2df0d2d5743ffb
  Author: Erich Keane <ekeane at nvidia.com>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M clang/lib/CIR/CodeGen/CIRGenConstantEmitter.h
    M clang/lib/CIR/CodeGen/CIRGenExprConstant.cpp
    M clang/lib/CIR/CodeGen/CIRGenModule.h
    A clang/test/CIR/CodeGen/compound_literal.c

  Log Message:
  -----------
  [CIR] Implement lowering for const-emitted global compound literals (#201152)

This came up in a test suite as a NYI, it is just emitting a
constant-backing literal for an initializer. These are specific to C, as
global compound literals have static storage duration in C. This patch,
just like classic codgen, just creates a '.compoundliteral' object as
backing for these variables, and lets us create references to them.

---------

Co-authored-by: Andy Kaylor <akaylor at nvidia.com>



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