[all-commits] [llvm/llvm-project] 144894: [CIR] Derive lowering attr names from cppClassName...

Henrich Lauko via All-commits all-commits at lists.llvm.org
Mon Sep 7 02:42:39 PDT 2026


  Branch: refs/heads/users/xlauko/cir-enum-12-emitter-cppclassname
  Home:   https://github.com/llvm/llvm-project
  Commit: 1448940994f4e346b3d6bee47e51996c8636d322
      https://github.com/llvm/llvm-project/commit/1448940994f4e346b3d6bee47e51996c8636d322
  Author: Henrich Lauko <hlauko at nvidia.com>
  Date:   2026-09-07 (Mon, 07 Sep 2026)

  Changed paths:
    M clang/utils/TableGen/CIRLoweringEmitter.cpp

  Log Message:
  -----------
  [CIR] Derive lowering attr names from cppClassName, not the def name

CIRLoweringEmitter built its CXX_ABI_ALWAYS_LEGAL_ATTRS entries with
GetOpCppClassName, which splits the TableGen def name at the first
underscore. That works only while every def is named CIR_<CppClassName>Attr.
When one is not, the emitter writes an `isa<>` for a class that does not
exist, and the failure lands as a compile error in generated code.

Attributes carry the authoritative name in cppClassName, which
GenerateAttrToValueVisitor was already reading. Factor that out as
GetAttrCppClassRef and use it for both attribute paths. GetOpCppClassName
stays for operations.

NFC, and checkable. No CIR attribute overrides cppClassName, so the generated
CIRLowering.inc is byte-identical.



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