2 Commits

Author SHA1 Message Date
Andy Kaylor
1e45ea12db
[CIR] Add support for function linkage and visibility (#145600)
This change adds support for function linkage and visibility and related
attributes. Most of the test changes are generalizations to allow
'dso_local' to be accepted where we aren't specifically testing for it.
Some tests based on CIR inputs have been updated to add 'private' to
function declarations where required by newly supported interfaces.

The dso-local.c test has been updated to add specific tests for
dso_local being set correctly, and a new test, func-linkage.cpp tests
other linkage settings.

This change sets `comdat` correctly in CIR, but it is not yet applied to
functions when lowering to LLVM IR. That will be handled in a later
change.
2025-06-25 10:59:30 -07:00
Erich Keane
0e07478a5e
[CIR] Implement lowering for LinkageSpecDecl (#137634)
Like the NamespaceDecl, this is just emitted as a decl-context, where
all its internal declarations get emitted for it. The incubator doesn't
seem to have any good tests for this, so I wrote what I could think of
as a half-decent test for this one, though the lowering doesn't manage
whether these should be mangled, so the test is mostly just for
spot-checking purposes.

I'm implementing this as it will make writing further tests for future
features a little easier.
2025-04-28 15:23:10 -07:00