Replies: 3 comments
-
Fragile is the word, yes :p But I don't see how we could use LLVM instead? |
Beta Was this translation helpful? Give feedback.
-
I guess it is more about the clang front-end, which is quite modular and can be reused for C code analysis and transformation. See for example the clang static analyzer project. |
Beta Was this translation helpful? Give feedback.
-
Yes, there have actually been attempts to do source-to-source transformation with LLVM and there used to be a C backend, which AFAIK doesn't exist anymore except as a fork at https://github.com/JuliaComputing/llvm-cbe. All of the other projects I've seen use OCaml or Haskell, which means a lot of context switching for me. I've actually written toy languages that use LLVM to compile them, so if we were to try this ourselves, that would be my preferred method. That said, I've been stuck on an old version forever due to breaking changes between versions. |
Beta Was this translation helpful? Give feedback.
-
This Perl script is fragile and should be replaced with something like http://coccinelle.lip6.fr/ or https://people.eecs.berkeley.edu/~necula/cil/ or something based on http://clang.llvm.org/
Beta Was this translation helpful? Give feedback.
All reactions