[LLVMdev] converting C++ to C question

Anton Korobeynikov asl at math.spbu.ru
Thu Sep 18 13:27:44 PDT 2008


Hello, Michael

> After it's working I use llvm to do some magic and I get C code that I
> can compile with a standard C compiler on any platform? That's what I
> planed to do.
Luke already answered one part of your question. Another part is that
you cannot run resulting C code on *any* platform: inside bytecode you
will have all sort of frontend-related stuff encoded implicitely: sizes
of integers, endian-related things, struct layout, etc. LLVM IR obtained
from C/C++ is not portable.

-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.




More information about the llvm-dev mailing list