kray-g / clang-jit Goto Github PK
View Code? Open in Web Editor NEWExample of C Compiler using JIT Engine of Clang.
License: MIT License
Example of C Compiler using JIT Engine of Clang.
License: MIT License
Currently your jit.cpp
code supports C++ API of Clang 8, but already Clang 13 is released. I suggest to update your jit.cpp
code to support Clang 13.
I did all necessary modifications in order to make it compilable under Clang 13. But as I don't have deep knowledge of Clang C++ library API hence I didn't more like syntaxical compilation fixes without much thinking.
Here is my version of jit.cpp
, only this file should be modified. In order to see all changes in code just do windiff jit_old.cpp jit_new.cpp
(WinDiff is standard tool under Windows).
I didn't make any Pull request first because I never did any so I don't know much details of how to do that. And second, more important, because I fixed only compilation issues but don't know if it is correct. It needs your expert look at modification in order to figure out if all is alright.
My code works (compilable) and tested both under MSVC 2022 and Win Clang 13. If I run compiled program on fib.c
then it gives correct answer and doesn't crash (program successfully finishes).
There is one TODO
word in my code, this is the place where I didn't manage to fix code correctly. It is the place where codeGenOptions.DebugPassManager
option is used to construct object of llvm::ModuleAnalysisManager
type (and other similar managers). I didn't fix this place correctly in a sence that I had to remove option codeGenOptions.DebugPassManager
totally in order to make it compilable, hence now these managers will run without debug pass (or debug info?).
I didn't compile Clang 13 myself, but took pre-compiled build from ZigLang github page, from here, precise pre-compiled version that I used is this one (this link may become invalid later).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.