[all-commits] [llvm/llvm-project] e91092: [ORC] Add SymbolNameSpec, hoist name mangling into...

Lang Hames via All-commits all-commits at lists.llvm.org
Tue Sep 8 00:07:09 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e91092685eab2ab0348ea06df2c3446001b480d4
      https://github.com/llvm/llvm-project/commit/e91092685eab2ab0348ea06df2c3446001b480d4
  Author: Lang Hames <lhames at gmail.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Mangling.h
    A llvm/include/llvm/ExecutionEngine/Orc/Shared/Mangler.h
    A llvm/include/llvm/ExecutionEngine/Orc/Shared/SymbolNameSpec.h
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/Mangling.cpp
    M llvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/Shared/Mangler.cpp
    M llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
    R llvm/unittests/ExecutionEngine/Orc/MangleAndInternerTest.cpp
    A llvm/unittests/ExecutionEngine/Orc/ManglerTest.cpp

  Log Message:
  -----------
  [ORC] Add SymbolNameSpec, hoist name mangling into Shared.

Introduce two Shared, ExecutionSession-independent pieces:

 - SymbolNameSpec (Shared/SymbolNameSpec.h): a StringRef paired with a
   SymbolNameKind (Verbatim, Linker, IR, C) describing the naming level
   a symbol name is expressed in. A lightweight, dependency-free value
   type, so it can describe interface-name constants in Shared headers.

 - Mangler (Shared/Mangler.h, Shared/Mangler.cpp): the linker
   name-mangling logic factored out of MangleAndInterner. It holds only
   a ManglingMode (no ExecutionSession or SymbolStringPool), so names
   can be mangled on the executor side as well as the controller
   side. It exposes withMangledNameDo (which avoids allocating when
   mangling is a no-op) and a mangledCopy convenience, both dispatching
   on the spec's SymbolNameKind.

MangleAndInterner becomes a thin wrapper: it derives a ManglingMode
(from an ABIName / ManglingMode / DataLayout), holds a Mangler, and
interns whatever the Mangler produces. Behavior is unchanged.

This lets lookup utilities eventually accept C / IR source names and
mangle them to linker level on the caller's behalf, rather than
requiring pre-mangled names. The MangleAndInternerTest unit tests are
renamed to ManglerTest and now exercise Mangler directly;
MangleAndInterner is left untested since it is slated for removal.



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