Displaying 2 results from an estimated 2 matches for "main_llvm2cpp".
2013 Mar 25
3
[LLVMdev] llvm2cpp attributes handling
...made a tiny reproducible example here, to be clear:
echo "int main() { return 0; };" > test.c && clang test.c -emit-llvm -c
-o - | llc -march=cpp -cppgen=function -cppfor=main -o -
This command is supposed to generate the C++ code to construct the main
function in LLVM (see main_llvm2cpp.cc joined file).
But an error occurs while generating the code (see stack trace below).
It appears that an assertion is broken while treating attributes in the
file CPPBackend.cpp.
So I dumped the main function's attributes before treating them, here is
the result:
PAL[
{ ~0U => *noun...
2013 Mar 25
0
[LLVMdev] llvm2cpp attributes handling
...xample here, to be clear:
>
> echo "int main() { return 0; };" > test.c && clang test.c -emit-llvm -c -o -
> | llc -march=cpp -cppgen=function -cppfor=main -o -
>
> This command is supposed to generate the C++ code to construct the main
> function in LLVM (see main_llvm2cpp.cc joined file).
> But an error occurs while generating the code (see stack trace below).
>
> It appears that an assertion is broken while treating attributes in the file
> CPPBackend.cpp.
> So I dumped the main function's attributes before treating them, here is the
> result:...