-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Description
Overview
This is a tracking issue for the project of upstreaming ClangIR support from the incubator repository into the top-of-trunk LLVM repository. This issue will be periodically updated with status, milestones, and any blocking issues.
Current Status
Upstreaming of ClangIR is currently still a work in progress, but we are making good progress. Most simple C programs can be compiled (with the embarrassing exception of any code that passes multiple arguments to printf
or other variadic functions). We are beginning to implement support for C++ constructs. You can define classes, including those using simple inheritance, access member variables, and call non-virtual member functions.
We have recently reached the state where you can compile code that includes any of the standard C++ header files on Linux. You won't be able to use many of the features in the standard library yet, because fundamental things like virtual function support are still missing, but we can process the header files. (If you find that not to be the case for some version of these headers, feel free to file a bug to let us know.)
Support for complex types is nearly complete. Normal cleanup of automatic variables (calling destructors when objects go out of scope) should be working. Bitfield support is now complete. Support has been added for a number of builtin functions.
As of August 13, 2025, approximately 40% of the code from the incubator project has been upstreamed. In addition, 62% (1140 of 1833) of the single source tests from the llvm-test-suite now pass when compiled with ClangIR enabled.
Coming soon
Work is underway in the following areas:
- Calling virtual functions and using virtual inheritance
- Exception handling
- Goto
- Inline assembly
- Atomics
Getting Involved
If you would like to help with the upstreaming effort, please contact @andykaylor
Check the list of open issues for tasks that could be started. Feel free to ask about any unassigned issue.
See also: https://discourse.llvm.org/t/rfc-upstreaming-clangir/76587