5 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
Andy Kaylor
9a3082276d
[CIR][NFC] Fix forrange.cpp test (#144123)
A recent change has cause the begin and end iterators in the
forrange.cpp CIR codegen test to be marked as 'init' causing the test to
fail. This change fixes the checks in the test.
2025-06-13 10:28:03 -07:00
Andy Kaylor
ea3c225786
[CIR] Add alignment support for global, store, and load ops (#141163)
This adds alignment support for GlobalOp, LoadOp, and StoreOp.

Tests which failed because cir.store/cir.load now print alignment were
updated with wildcard matches, except where the alignment was relevant
to the test. Tests which check for cir.store/cir.load in cases that
don't have explicit alignment were not updated.

New tests for alignment are alignment.c, align-load.c, and
align-store.c.
2025-05-23 15:34:59 -07:00
Andy Kaylor
cbcfe667bb
[CIR] Upstream support for iterator-based range for loops (#140636)
This change adds handling for C++ member operator calls, implicit no-op
casts, and l-value call expressions. Together, these changes enable
handling of range for loops based on iterators.
2025-05-20 10:52:15 -07:00
Andy Kaylor
c3ca0fb91e
[CIR] Add test for begin/end range for statements (#139134)
This adds a test to verify range for loops based on begin() and end()
funtion calls. The functionality to enable this was added in previous
commits, but those commits were only indirectly related to this test.
The general intent of this commit is to work towards enabling
iterator-based range for loops.

The test did reveal one minor problem in call argument handling, which
is corrected here.
2025-05-09 12:26:37 -07:00